Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapcache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapcache
Commits
e883e945
Commit
e883e945
authored
May 13, 2022
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests in python2
parent
abba1a33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
slapcache/test/test_signature.py
slapcache/test/test_signature.py
+5
-3
No files found.
slapcache/test/test_signature.py
View file @
e883e945
from
slapcache.signature
import
Signature
,
Config
,
strategy
from
slapcache.signature
import
Signature
,
Config
,
strategy
from
slapos.libnetworkcache
import
NetworkcacheClient
from
slapos.libnetworkcache
import
NetworkcacheClient
from
optparse
import
Values
import
slapos.signature
,
tempfile
,
unittest
,
os
,
sys
import
slapos.signature
,
time
,
difflib
,
tempfile
,
unittest
,
os
def
_fake_call
(
self
,
*
args
,
**
kw
):
def
_fake_call
(
self
,
*
args
,
**
kw
):
self
.
last_call
=
(
args
,
kw
)
self
.
last_call
=
(
args
,
kw
)
...
@@ -146,7 +145,10 @@ signature-certificate-list =
...
@@ -146,7 +145,10 @@ signature-certificate-list =
def
test_configuration_file_dont_exist
(
self
):
def
test_configuration_file_dont_exist
(
self
):
self
.
config_dict
.
slapos_configuration
=
'/abc/123'
self
.
config_dict
.
slapos_configuration
=
'/abc/123'
self
.
assertRaises
(
FileNotFoundError
,
Signature
,
self
.
config_dict
)
if
sys
.
version_info
.
major
<
3
:
self
.
assertRaises
(
IOError
,
Signature
,
self
.
config_dict
)
else
:
self
.
assertRaises
(
FileNotFoundError
,
Signature
,
self
.
config_dict
)
def
test_download_not_existing
(
self
):
def
test_download_not_existing
(
self
):
_
,
path
=
tempfile
.
mkstemp
()
_
,
path
=
tempfile
.
mkstemp
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment