| |
@@ -39,6 +39,13 @@
|
| |
bug2 = add_bug(9002, 'testbug2', cls.milestone)
|
| |
bug2.accepted_blocker = False
|
| |
bug2.proposed_fe = True
|
| |
+ bug3 = add_bug(9003, 'testbug3', cls.milestone)
|
| |
+ bug3.accepted_blocker = False
|
| |
+ bug3.proposed_fe = True
|
| |
+ bug4 = add_bug(9003, 'testbug3', cls.milestone2) # same bugid and summary as bug3 is intentional
|
| |
+ bug4.accepted_blocker = True
|
| |
+ bug4.proposed_fe = False
|
| |
+ bug4.status = 'CLOSED'
|
| |
cls.update_pending_stable = add_update(u'test-pending-stable.fc99',
|
| |
u'stable', [bug1], cls.release,
|
| |
[cls.milestone, cls.milestone2])
|
| |
@@ -82,7 +89,7 @@
|
| |
resp = self.client.get(url)
|
| |
assert resp.status_code == httplib.OK
|
| |
data = json.loads(resp.data)
|
| |
- assert len(data) == 2
|
| |
+ assert len(data) == 3
|
| |
bug = data[0]
|
| |
assert bug['bugid'] == 9000
|
| |
assert bug['url'] == 'https://bugzilla.redhat.com/show_bug.cgi?id=9000'
|
| |
@@ -180,3 +187,13 @@
|
| |
data = str(resp.data)
|
| |
|
| |
assert _BUG_CLOSED in data
|
| |
+
|
| |
+ def test_get_bugimg_multiple_bugs_unsynced_status(self):
|
| |
+ url = '/api/v0/bugimg/9003'
|
| |
+ resp = self.client.get(url)
|
| |
+ assert resp.status_code == httplib.OK
|
| |
+ data = str(resp.data)
|
| |
+
|
| |
+ assert '99-beta' in data
|
| |
+ assert '99-final' in data
|
| |
+ assert _BUG_CLOSED not in data
|
| |
Bugimg showed bugs as closed when they weren't.
This happened when previously proposed and closed
bug (e.g. proposed for beta and solved) was reopened
and proposed again (e.g. for final). Bug sync won't
update bugs in inactive milestones, show CLOSED only
when all bugs with the same bugid have status CLOSED.
Fix for #144