Commit 98e4dd22 authored by Łukasz Nowak's avatar Łukasz Nowak

Do assertions in one place.

parent 31f871a3
...@@ -574,10 +574,9 @@ exit 0""" % {'worked_file': worked_file}) ...@@ -574,10 +574,9 @@ exit 0""" % {'worked_file': worked_file})
self.error = True self.error = True
self.assertEqual(parsed_qs['computer_partition_id'][0], '0') self.assertEqual(parsed_qs['computer_partition_id'][0], '0')
# XXX: Hardcoded dropPrivileges line ignore # XXX: Hardcoded dropPrivileges line ignore
error_log = '\n'.join([line for line in parsed_qs['error_log'][0].splitlines() self.error_log = '\n'.join([line for line in parsed_qs['error_log'][0].splitlines()
if 'dropPrivileges' not in line]) if 'dropPrivileges' not in line])
# end XXX # end XXX
self.assertEqual(error_log, 'Error')
return (200, {}, '') return (200, {}, '')
else: else:
return (404, {}, '') return (404, {}, '')
...@@ -602,6 +601,7 @@ exit 127""" % {'worked_file': worked_file}) ...@@ -602,6 +601,7 @@ exit 127""" % {'worked_file': worked_file})
self.assertTrue(self.grid.processComputerPartitionList()) self.assertTrue(self.grid.processComputerPartitionList())
self.assertTrue(os.path.isfile(worked_file)) self.assertTrue(os.path.isfile(worked_file))
self.assertEqual(self.error_log, 'Error')
self.assertTrue(self.error) self.assertTrue(self.error)
def test_timeout_works(self): def test_timeout_works(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