fix tests

This commit is contained in:
Tim Bentley 2016-11-06 08:52:15 +00:00
parent 84d7b80ff7
commit be556248b8

View File

@ -106,14 +106,13 @@ class TestWSServer(TestCase, TestMixin):
Registry().register('service_manager', mocked_service_manager) Registry().register('service_manager', mocked_service_manager)
# THEN: the live json should be generated and match expected results # THEN: the live json should be generated and match expected results
poll_json = self.poll.poll() poll_json = self.poll.poll()
data = json.loads(poll_json.decode()) self.assertTrue(poll_json['results']['blank'], 'The blank return value should be True')
self.assertTrue(data['results']['blank'], 'The blank return value should be True') self.assertFalse(poll_json['results']['theme'], 'The theme return value should be False')
self.assertFalse(data['results']['theme'], 'The theme return value should be False') self.assertFalse(poll_json['results']['display'], 'The display return value should be False')
self.assertFalse(data['results']['display'], 'The display return value should be False') self.assertFalse(poll_json['results']['isSecure'], 'The isSecure return value should be False')
self.assertFalse(data['results']['isSecure'], 'The isSecure return value should be False') self.assertFalse(poll_json['results']['isAuthorised'], 'The isAuthorised return value should be False')
self.assertFalse(data['results']['isAuthorised'], 'The isAuthorised return value should be False') self.assertTrue(poll_json['results']['twelve'], 'The twelve return value should be False')
self.assertTrue(data['results']['twelve'], 'The twelve return value should be False') self.assertEquals(poll_json['results']['version'], 3, 'The version return value should be 3')
self.assertEquals(data['results']['version'], 3, 'The version return value should be 3') self.assertEquals(poll_json['results']['slide'], 5, 'The slide return value should be 5')
self.assertEquals(data['results']['slide'], 5, 'The slide return value should be 5') self.assertEquals(poll_json['results']['service'], 21, 'The version return value should be 21')
self.assertEquals(data['results']['service'], 21, 'The version return value should be 21') self.assertEquals(poll_json['results']['item'], '23-34-45', 'The item return value should match 23-34-45')
self.assertEquals(data['results']['item'], '23-34-45', 'The item return value should match 23-34-45')