Commit 675780a9 authored by Nicolas Joyard's avatar Nicolas Joyard
Browse files

Avoid ContentType UK error and fix expected group URLs

parent d3148298
......@@ -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>",
))
......
......@@ -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())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment