From 675780a9e2e5e463f5f9b3ab81ec92ea616af943 Mon Sep 17 00:00:00 2001 From: Nicolas Joyard <joyard.nicolas@gmail.com> Date: Mon, 18 Apr 2016 08:56:46 +0200 Subject: [PATCH] Avoid ContentType UK error and fix expected group URLs --- memopol/tests/test_representatives_detail.py | 2 +- representatives_positions/tests/test_functional.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/memopol/tests/test_representatives_detail.py b/memopol/tests/test_representatives_detail.py index 2ba31f3c..1fda7e34 100644 --- a/memopol/tests/test_representatives_detail.py +++ b/memopol/tests/test_representatives_detail.py @@ -35,7 +35,7 @@ class RepresentativeDetailTest(UrlGetTestMixin, TestCase): def test_current_mandate_display(self): expected = ''.join(( - "<a href='/legislature/representative/group/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>", # noqa + "<a href='/legislature/representative/group/European%20Parliament/Group%20of%20the%20Progressive%20Alliance%20of%20Socialists%20and%20Democrats%20in%20the%20European%20Parliament/'>", # noqa "Member of Group of the Progressive Alliance of Socialists and Democrats in the European Parliament", # noqa "</a>", )) diff --git a/representatives_positions/tests/test_functional.py b/representatives_positions/tests/test_functional.py index 28fa0dce..2925229f 100644 --- a/representatives_positions/tests/test_functional.py +++ b/representatives_positions/tests/test_functional.py @@ -76,9 +76,10 @@ class PositionTest(TestCase): # Trigger irrelevant queries that happen only once ie. constance before # testing actual page queries. self.client.get(position.get_absolute_url()) - with self.assertNumQueries(3): + with self.assertNumQueries(4): # One for position and rep and score # One for rep mandates + # One for rep chamber # One for position tags response = self.client.get(position.get_absolute_url()) -- GitLab