← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Colin Watson has proposed merging ~cjwatson/launchpad:py3-imprecise-upstream-bug-privacy-tests into launchpad:master.

Commit message:
Fix imprecise tests in xx-upstream-bug-privacy.txt

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/399292

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.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-imprecise-upstream-bug-privacy-tests into launchpad:master.
diff --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
index 99395be..cbc2de2 100644
--- a/lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt
+++ b/lib/lp/bugs/stories/upstream-bugprivacy/xx-upstream-bug-privacy.txt
@@ -50,17 +50,17 @@ bug listing.
     ...
     ...4 results...
     ...
-    ...5...
-    ...Critical...
+    ...<div class="importance importanceCRITICAL"> Critical </div>...
+    ...<span class="bugnumber">#5</span>...
     ...
-    ...4...
-    ...Medium...
+    ...<div class="importance importanceMEDIUM"> Medium </div>...
+    ...<span class="bugnumber">#4</span>...
     ...
-    ...1...
-    ...Low...
+    ...<div class="importance importanceLOW"> Low </div>...
+    ...<span class="bugnumber">#1</span>...
     ...
-    ...BUG-ID...
-    ...Undecided...
+    ...<div class="importance importanceUNDECIDED"> Undecided </div>...
+    ...<span class="bugnumber">#BUG-ID</span>...
 
 == Checking basic access to the private bug pages ==
 
@@ -112,9 +112,9 @@ private bug just filed by Sample Person is not visible.
   ... """))
   HTTP/1.1 200 Ok
   ...3 results...
-  ...5...
-  ...4...
-  ...1...
+  ...<span class="bugnumber">#5</span>...
+  ...<span class="bugnumber">#4</span>...
+  ...<span class="bugnumber">#1</span>...
   ...
 
 Trying to access a private upstream bug as an anonymous user results
@@ -142,9 +142,12 @@ submitted earlier.
   ... """))
   HTTP/1.1 200 Ok
   ...Mozilla Firefox...
-  ...5...Firefox install instructions should be complete...
-  ...4...Reflow problems with complex page layouts...
-  ...1...Firefox does not support SVG...
+  ...<span class="bugnumber">#5</span>...
+  ...Firefox install instructions should be complete...
+  ...<span class="bugnumber">#4</span>...
+  ...Reflow problems with complex page layouts...
+  ...<span class="bugnumber">#1</span>...
+  ...Firefox does not support SVG...
   ...