Fix testing

pull/49/head
Raphaël Vinot 2017-01-27 13:17:38 +01:00
parent 2b9663cdf4
commit cc3176fe38
1 changed files with 3 additions and 2 deletions

View File

@ -38,7 +38,8 @@ class TestOffline(unittest.TestCase):
def initURI(self, m): def initURI(self, m):
m.register_uri('GET', self.domain + 'events/1', json=self.auth_error_msg, status_code=403) m.register_uri('GET', self.domain + 'events/1', json=self.auth_error_msg, status_code=403)
m.register_uri('GET', self.domain + 'servers/getVersion.json', json={"version": "2.4.56"}) m.register_uri('GET', self.domain + 'servers/getVersion.json', json={"version": "2.4.62"})
m.register_uri('GET', self.domain + 'servers/getPyMISPVersion.json', json={"version": "2.4.62"})
m.register_uri('GET', self.domain + 'sharing_groups.json', json=self.sharing_groups) m.register_uri('GET', self.domain + 'sharing_groups.json', json=self.sharing_groups)
m.register_uri('GET', self.domain + 'attributes/describeTypes.json', json=self.types) m.register_uri('GET', self.domain + 'attributes/describeTypes.json', json=self.types)
m.register_uri('GET', self.domain + 'events/2', json=self.event) m.register_uri('GET', self.domain + 'events/2', json=self.event)
@ -97,7 +98,7 @@ class TestOffline(unittest.TestCase):
api_version = pymisp.get_api_version() api_version = pymisp.get_api_version()
self.assertEqual(api_version, {'version': pm.__version__}) self.assertEqual(api_version, {'version': pm.__version__})
server_version = pymisp.get_version() server_version = pymisp.get_version()
self.assertEqual(server_version, {"version": "2.4.56"}) self.assertEqual(server_version, {"version": "2.4.62"})
def test_getSharingGroups(self, m): def test_getSharingGroups(self, m):
self.initURI(m) self.initURI(m)