Merge ~cjwatson/launchpad:py3-imprecise-upstream-bug-privacy-tests into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 34197e1376d65e918754a9dcdbe75c32454206b8
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:py3-imprecise-upstream-bug-privacy-tests
Merge into: launchpad:master
Diff against target: 57 lines (+17/-14)
1 file modified
lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt (+17/-14)
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
Review via email: mp+399292@code.launchpad.net

Commit message

Fix imprecise tests in xx-upstream-bug-privacy.txt

Description of the change

One of the examples in xx-upstream-bug-privacy.txt listed the bug number and importance in the wrong order, but the test was so imprecise that it normally managed to pass anyway by matching random bits of text from things like HTML comments and the `LP.cache` JavaScript object, except when dict ordering changes in Python 3 happened to put those in a different order. Make these tests more precise so that they don't accidentally depend on this kind of thing.

To post a comment you must log in.
Revision history for this message
Ioana Lasc (ilasc) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt b/lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt
2index 99395be..cbc2de2 100644
3--- a/lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt
4+++ b/lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt
5@@ -50,17 +50,17 @@ bug listing.
6 ...
7 ...4 results...
8 ...
9- ...5...
10- ...Critical...
11+ ...<div class="importance importanceCRITICAL"> Critical </div>...
12+ ...<span class="bugnumber">#5</span>...
13 ...
14- ...4...
15- ...Medium...
16+ ...<div class="importance importanceMEDIUM"> Medium </div>...
17+ ...<span class="bugnumber">#4</span>...
18 ...
19- ...1...
20- ...Low...
21+ ...<div class="importance importanceLOW"> Low </div>...
22+ ...<span class="bugnumber">#1</span>...
23 ...
24- ...BUG-ID...
25- ...Undecided...
26+ ...<div class="importance importanceUNDECIDED"> Undecided </div>...
27+ ...<span class="bugnumber">#BUG-ID</span>...
28
29 == Checking basic access to the private bug pages ==
30
31@@ -112,9 +112,9 @@ private bug just filed by Sample Person is not visible.
32 ... """))
33 HTTP/1.1 200 Ok
34 ...3 results...
35- ...5...
36- ...4...
37- ...1...
38+ ...<span class="bugnumber">#5</span>...
39+ ...<span class="bugnumber">#4</span>...
40+ ...<span class="bugnumber">#1</span>...
41 ...
42
43 Trying to access a private upstream bug as an anonymous user results
44@@ -142,9 +142,12 @@ submitted earlier.
45 ... """))
46 HTTP/1.1 200 Ok
47 ...Mozilla Firefox...
48- ...5...Firefox install instructions should be complete...
49- ...4...Reflow problems with complex page layouts...
50- ...1...Firefox does not support SVG...
51+ ...<span class="bugnumber">#5</span>...
52+ ...Firefox install instructions should be complete...
53+ ...<span class="bugnumber">#4</span>...
54+ ...Reflow problems with complex page layouts...
55+ ...<span class="bugnumber">#1</span>...
56+ ...Firefox does not support SVG...
57 ...
58
59

Subscribers

People subscribed via source and target branches

to status/vote changes: