Commit e883e945 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Fix tests in python2

parent abba1a33
from slapcache.signature import Signature, Config, strategy
from slapos.libnetworkcache import NetworkcacheClient
from optparse import Values
import slapos.signature, time, difflib, tempfile, unittest, os
import slapos.signature, tempfile, unittest, os, sys
def _fake_call(self, *args, **kw):
self.last_call = (args, kw)
......@@ -146,6 +145,9 @@ signature-certificate-list =
def test_configuration_file_dont_exist(self):
self.config_dict.slapos_configuration = '/abc/123'
if sys.version_info.major < 3:
self.assertRaises(IOError, Signature, self.config_dict)
self.assertRaises(FileNotFoundError, Signature, self.config_dict)
def test_download_not_existing(self):
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