summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/test_v3.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index 716db7d39..8b0cb3bf1 100644
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -3208,8 +3208,9 @@ class TestNonLiveMerges(ZuulTestCase):
# We expect one merge call per live change, plus one call for
# each non-live change with a config update (which is all of them).
- self.assertEqual(
- len(self.scheds.first.sched.merger.history[MergeRequest.MERGE]), 6)
+ merge_jobs = [job for job in self.merge_job_history.values()
+ if job.job_type == MergeRequest.MERGE]
+ self.assertEqual(len(merge_jobs), 6)
def test_non_live_merges(self):
"""
@@ -3232,8 +3233,9 @@ class TestNonLiveMerges(ZuulTestCase):
self.waitUntilSettled()
# We expect one merge call per live change.
- self.assertEqual(
- len(self.scheds.first.sched.merger.history[MergeRequest.MERGE]), 3)
+ merge_jobs = [job for job in self.merge_job_history.values()
+ if job.job_type == MergeRequest.MERGE]
+ self.assertEqual(len(merge_jobs), 3)
class TestJobContamination(AnsibleZuulTestCase):