Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.libnetworkcache
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.libnetworkcache
Commits
ab79b5cb
Commit
ab79b5cb
authored
Jul 06, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement basic testing.
parent
98ec239b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
setup.py
setup.py
+1
-0
slapos/libnetworkcachetests.py
slapos/libnetworkcachetests.py
+13
-0
No files found.
setup.py
View file @
ab79b5cb
...
@@ -30,4 +30,5 @@ setup(
...
@@ -30,4 +30,5 @@ setup(
zip_safe
=
True
,
zip_safe
=
True
,
packages
=
find_packages
(),
packages
=
find_packages
(),
namespace_packages
=
[
'slapos'
],
namespace_packages
=
[
'slapos'
],
test_suite
=
"slapos.libnetworkcachetests"
)
)
slapos/libnetworkcachetests.py
0 → 100644
View file @
ab79b5cb
import
unittest
from
slapos.libnetworkcache
import
NetworkcacheClient
import
tempfile
class
OfflineTest
(
unittest
.
TestCase
):
def
test_download_offline
(
self
):
nc
=
NetworkcacheClient
(
'http://127.0.0.1:0'
,
'http://127.0.0.1:0'
)
self
.
assertRaises
(
IOError
,
nc
.
download
,
'sha512sum'
)
def
test_upload_offline
(
self
):
content
=
tempfile
.
TemporaryFile
()
nc
=
NetworkcacheClient
(
'http://127.0.0.1:0'
,
'http://127.0.0.1:0'
)
self
.
assertRaises
(
IOError
,
nc
.
upload
,
content
)
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