def test_error_occured_with_error(self): """A psql error is detected correctly.""" output = ''' psql:/tmp/openquake/hzrdi/0.3.9-1/5/55-eee.sql:1: ERROR: relation "admin.dbm_test" does not exist LINE 1: INSERT INTO admin.dbm_test(name) VALUES('5/55-eee.sql'); ''' self.assertTrue(error_occurred(output))
def test_error_occured_with_error(self): """A psql error is detected correctly.""" output = ''' psql:/tmp/openquake/pshai/0.3.9-1/5/55-eee.sql:1: ERROR: relation "admin.dbm_test" does not exist LINE 1: INSERT INTO admin.dbm_test(name) VALUES('5/55-eee.sql'); ''' self.assertTrue(error_occurred(output))
def test_error_occured_with_no_error(self): """A psql error is not detected (which is correct).""" output = ''' LINE 1: INSERT INTO admin.dbm_test(name) VALUES('5/55-eee.sql'); ''' self.assertFalse(error_occurred(output))
def test_error_occured_with_no_error(self): """A psql error is not detected (which is correct).""" output = ''' LINE 1: INSERT INTO admin.dbm_test(name) VALUES('5/55-eee.sql'); ''' self.assertFalse(error_occurred(output))