jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/606689 )
Change subject: [tests] Remove tracker ids in test_fetch if present ......................................................................
[tests] Remove tracker ids in test_fetch if present
Bug: T255862 Change-Id: Ifbc2af38c1fd6771ea75e3ee31ec7b9cb3d3e10f --- M tests/http_tests.py 1 file changed, 8 insertions(+), 3 deletions(-)
Approvals: Dvorapa: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/http_tests.py b/tests/http_tests.py index 4e7f56d..8bf693a 100644 --- a/tests/http_tests.py +++ b/tests/http_tests.py @@ -666,6 +666,10 @@
def test_fetch(self): """Test that using the data and body params produce same results.""" + tracker = ( + 'X-Amzn-Trace-Id', 'X-B3-Parentspanid', 'X-B3-Spanid', + 'X-B3-Traceid', 'X-Forwarded-Client-Cert', + ) r_data_request = http.fetch(uri=self.get_httpbin_url('/post'), method='POST', data={'fish&chips': 'delicious'}) @@ -676,9 +680,10 @@ r_data = json.loads(r_data_request.text) r_body = json.loads(r_body_request.text)
- # remove X-Amzn-Trace-Id if present (T243662) - r_data['headers'].pop('X-Amzn-Trace-Id', None) - r_body['headers'].pop('X-Amzn-Trace-Id', None) + # remove tracker ids if present (T243662, T255862) + for tracker_id in tracker: + r_data['headers'].pop(tracker_id, None) + r_body['headers'].pop(tracker_id, None)
self.assertDictEqual(r_data, r_body)
pywikibot-commits@lists.wikimedia.org