Skip to content

Commit 6505c12

Browse files
author
Thomas Preud'homme
committed
[LNT] Python 3 support: don't assume URL params order
Summary: Test server/ui/V4Pages.py tests on 2 occasions an address redirection with parameters in it. However order of those parameters changes between Python 2 and Python 3. This commit adapts the tests to accept all possible orders. Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls, leandron, PrzemekWirkus Reviewed By: cmatthews Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D68989
1 parent f243f14 commit 6505c12

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/server/ui/V4Pages.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ def main():
371371

372372
# Get a graph page. This has been changed to redirect.
373373
check_redirect(client, '/v4/nts/1/graph?test.3=2',
374-
'v4/nts/graph\?plot\.0=1\.3\.2&highlight_run=1$')
374+
'v4/nts/graph\?'
375+
'(plot\.0=1\.3\.2&highlight_run=1'
376+
'|highlight_run=1&plot\.0=1\.3\.2)$')
375377

376378
# Get a run that contains generic producer information
377379
check_producer_label(client, '/v4/nts/7',
@@ -655,7 +657,9 @@ def main():
655657
# Check we can convert a sample into a graph page.
656658
graph_to_sample = check_code(client, '/db_default/v4/nts/graph_for_sample/10/compile_time?foo=bar',
657659
expected_code=HTTP_REDIRECT)
658-
assert graph_to_sample.headers['Location'] == "http://localhost/db_default/v4/nts/graph?foo=bar&plot.0=2.6.0"
660+
assert graph_to_sample.headers['Location'] in (
661+
"http://localhost/db_default/v4/nts/graph?foo=bar&plot.0=2.6.0",
662+
"http://localhost/db_default/v4/nts/graph?plot.0=2.6.0&foo=bar")
659663

660664
# Check that is we ask for a sample or invalid field, we explode with 400s.
661665
check_code(client, '/db_default/v4/nts/graph_for_sample/10000/compile_time?foo=bar',

0 commit comments

Comments
 (0)