Fix tests

This commit is contained in:
Tim Bentley 2017-12-09 15:32:05 +00:00
parent 3a9d2f6a61
commit ed2b87aed3
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ class TestApiTab(TestCase, TestMixin):
# WHEN: the default ip address is given # WHEN: the default ip address is given
ip_address = self.form.get_ip_address(ZERO_URL) ip_address = self.form.get_ip_address(ZERO_URL)
# THEN: the default ip address will be returned # THEN: the default ip address will be returned
assert (re.match('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'), ip_address) is True, \ assert re.match('\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}', ip_address) is True, \
'The return value should be a valid ip address' 'The return value should be a valid ip address'
def test_get_ip_address_with_ip(self): def test_get_ip_address_with_ip(self):

View File

@ -129,12 +129,12 @@ class TestWSServer(TestCase, TestMixin):
mocked_is_chords_active.return_value = True mocked_is_chords_active.return_value = True
poll_json = self.poll.poll() poll_json = self.poll.poll()
# THEN: the live json should be generated and match expected results # THEN: the live json should be generated and match expected results
assert poll_json['results']['blank'] is False, 'The blank return value should be True' assert poll_json['results']['blank'] is True, 'The blank return value should be True'
assert poll_json['results']['theme'] is False, 'The theme return value should be False' assert poll_json['results']['theme'] is False, 'The theme return value should be False'
assert poll_json['results']['display'] is False, 'The display return value should be False' assert poll_json['results']['display'] is False, 'The display return value should be False'
assert poll_json['results']['isSecure'] is False, 'The isSecure return value should be False' assert poll_json['results']['isSecure'] is False, 'The isSecure return value should be False'
assert poll_json['results']['isAuthorised'] is False, 'The isAuthorised return value should be False' assert poll_json['results']['isAuthorised'] is False, 'The isAuthorised return value should be False'
assert poll_json['results']['twelve'] is True, 'The twelve return value should be False' assert poll_json['results']['twelve'] is False, 'The twelve return value should be False'
assert poll_json['results']['version'] == 3, 'The version return value should be 3' assert poll_json['results']['version'] == 3, 'The version return value should be 3'
assert poll_json['results']['slide'] == 5, 'The slide return value should be 5' assert poll_json['results']['slide'] == 5, 'The slide return value should be 5'
assert poll_json['results']['service'] == 21, 'The version return value should be 21' assert poll_json['results']['service'] == 21, 'The version return value should be 21'