Tests
* extends test for new behaviour of newly created entries
This commit is contained in:
parent
bfbe1085b2
commit
aa13e60bc0
@ -71,6 +71,7 @@ class CompensationWorkflowTestCase(BaseWorkflowTestCase):
|
||||
self.assertEqual(new_compensation.title, test_title)
|
||||
self.assert_equal_geometries(new_compensation.geometry.geom, test_geom)
|
||||
self.assertEqual(new_compensation.log.count(), 1)
|
||||
self.assertEqual(new_compensation.created, new_compensation.modified)
|
||||
|
||||
# Expect logs to be set
|
||||
self.assertEqual(pre_creation_intervention_log_count + 1, self.intervention.log.count())
|
||||
|
@ -65,6 +65,7 @@ class EcoAccountWorkflowTestCase(BaseWorkflowTestCase):
|
||||
self.assertEqual(acc.deductable_rest, test_deductable_surface)
|
||||
self.assert_equal_geometries(acc.geometry.geom, test_geom)
|
||||
self.assertEqual(acc.log.count(), 1)
|
||||
self.assertEqual(acc.created, acc.modified)
|
||||
|
||||
# Expect logs to be set
|
||||
self.assertEqual(acc.log.count(), 1)
|
||||
|
@ -62,6 +62,7 @@ class EmaWorkflowTestCase(BaseWorkflowTestCase):
|
||||
self.assertEqual(ema.title, test_title)
|
||||
self.assert_equal_geometries(ema.geometry.geom, test_geom)
|
||||
self.assertEqual(ema.log.count(), 1)
|
||||
self.assertEqual(ema.created, ema.modified)
|
||||
|
||||
# Expect logs to be set
|
||||
self.assertEqual(ema.log.count(), 1)
|
||||
|
@ -78,6 +78,7 @@ class InterventionWorkflowTestCase(BaseWorkflowTestCase):
|
||||
self.assertEqual(1, obj.log.count())
|
||||
self.assertEqual(obj.log.first().action, UserAction.CREATED)
|
||||
self.assertEqual(obj.log.first().user, self.superuser)
|
||||
self.assertEqual(obj.created, obj.modified)
|
||||
except ObjectDoesNotExist:
|
||||
# Fail if there is no such object
|
||||
self.fail()
|
||||
|
Loading…
Reference in New Issue
Block a user