summaryrefslogtreecommitdiff
path: root/patchwork/tests/test_events.py
diff options
context:
space:
mode:
Diffstat (limited to 'patchwork/tests/test_events.py')
-rw-r--r--patchwork/tests/test_events.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/patchwork/tests/test_events.py b/patchwork/tests/test_events.py
index b9952f6..bd4f9be 100644
--- a/patchwork/tests/test_events.py
+++ b/patchwork/tests/test_events.py
@@ -34,8 +34,8 @@ class PatchCreateTest(_BaseTestCase):
"""No series, so patch dependencies implicitly exist."""
patch = utils.create_patch()
- # This should raise both the CATEGORY_PATCH_CREATED and
- # CATEGORY_PATCH_COMPLETED events as there are no specific dependencies
+ # This should raise the CATEGORY_PATCH_CREATED event only as there is
+ # no series
events = _get_events(patch=patch)
self.assertEqual(events.count(), 1)
self.assertEqual(events[0].category, Event.CATEGORY_PATCH_CREATED)
@@ -57,6 +57,13 @@ class PatchCreateTest(_BaseTestCase):
self.assertEventFields(events[0])
self.assertEventFields(events[1])
+ # This shouldn't be affected by another update to the patch
+ series_patch.patch.commit_ref = 'aac76f0b0f8dd657ff07bb'
+ series_patch.patch.save()
+
+ events = _get_events(patch=series_patch.patch)
+ self.assertEqual(events.count(), 2)
+
def test_patch_dependencies_out_of_order(self):
series = utils.create_series()
series_patch_3 = utils.create_series_patch(series=series, number=3)