From 6b0b6509b12df1f117afa3cc290589617bb1e07d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 23 Jan 2021 12:35:43 +0100 Subject: [PATCH] tests: parse query string to check if parameter is not present (#50467) --- tests/test_dataviz.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_dataviz.py b/tests/test_dataviz.py index 2d3a5dd7..497a29b3 100644 --- a/tests/test_dataviz.py +++ b/tests/test_dataviz.py @@ -1,4 +1,5 @@ import json +import urllib.parse import mock import pytest @@ -1266,7 +1267,8 @@ def test_chartng_cell_new_api_filter_params(new_api_statistics, nocache, freezer cell.save() chart = cell.get_chart() request = new_api_mock.call['requests'][3] - assert 'start' not in request.url and 'end' not in request.url + assert 'start' not in urllib.parse.parse_qs(urllib.parse.urlparse(request.url).query) + assert 'end' not in urllib.parse.parse_qs(urllib.parse.urlparse(request.url).query) cell.time_range_start = '2020-10-01' cell.save()