Commit ab79b5cb authored by Łukasz Nowak's avatar Łukasz Nowak

Implement basic testing.

parent 98ec239b
......@@ -30,4 +30,5 @@ setup(
zip_safe=True,
packages=find_packages(),
namespace_packages=['slapos'],
test_suite="slapos.libnetworkcachetests"
)
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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment