Make the poll query test a little more robust.
parent
abf0b1a7ae
commit
1136e37cf0
|
@ -99,9 +99,11 @@ NOTICE: Hello, world!
|
||||||
self.assertEquals(response.status_code, 200)
|
self.assertEquals(response.status_code, 200)
|
||||||
response_data = json.loads(response.data.decode('utf-8'))
|
response_data = json.loads(response.data.decode('utf-8'))
|
||||||
|
|
||||||
|
if self.expected_message[cnt] is not None:
|
||||||
# Check the returned messages
|
# Check the returned messages
|
||||||
self.assertEquals(self.expected_message[cnt],
|
self.assertIn(self.expected_message[cnt],
|
||||||
response_data['data']['additional_messages'])
|
response_data['data']['additional_messages'])
|
||||||
|
|
||||||
# Check the output
|
# Check the output
|
||||||
self.assertEquals(self.expected_result[cnt],
|
self.assertEquals(self.expected_result[cnt],
|
||||||
response_data['data']['result'][0][0])
|
response_data['data']['result'][0][0])
|
||||||
|
|
Loading…
Reference in New Issue