launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28850
[Merge] ~andrey-fedoseev/launchpad:uct-import into launchpad:master
Andrey Fedoseev has proposed merging ~andrey-fedoseev/launchpad:uct-import into launchpad:master.
Commit message:
Fix the test for the import bug activity
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~andrey-fedoseev/launchpad/+git/launchpad/+merge/427146
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~andrey-fedoseev/launchpad:uct-import into launchpad:master.
diff --git a/lib/lp/bugs/scripts/tests/test_uctimport.py b/lib/lp/bugs/scripts/tests/test_uctimport.py
index fc66d82..4b52c4d 100644
--- a/lib/lp/bugs/scripts/tests/test_uctimport.py
+++ b/lib/lp/bugs/scripts/tests/test_uctimport.py
@@ -336,12 +336,14 @@ class TestUCTImporter(TestCaseWithFactory):
self.assertEqual(bug.cves, [lp_cve])
- activities = bug.activity
- self.assertEqual(len(activities), 1)
- activity = activities[0]
- self.assertEqual(activity.person, owner)
- self.assertEqual(activity.whatchanged, "bug")
- self.assertEqual(activity.message, "UCT CVE entry CVE-2022-23222")
+ activities = list(bug.activity)
+ self.assertEqual(len(activities), 16)
+ import_bug_activity = activities[-1]
+ self.assertEqual(import_bug_activity.person, owner)
+ self.assertEqual(import_bug_activity.whatchanged, "bug")
+ self.assertEqual(
+ import_bug_activity.message, "UCT CVE entry CVE-2022-23222"
+ )
self.assertEqual(len(vulnerabilities), 1)