From ce8de2cf77f32f1cc5781cda81d864df68bff39e Mon Sep 17 00:00:00 2001
From: Nicolas Joyard <joyard.nicolas@gmail.com>
Date: Sun, 17 Apr 2016 10:41:40 +0200
Subject: [PATCH] Fix tests

REMOVE DB.SQLITE
---
 .../content                                                  | 5 +++++
 .../status_code                                              | 1 +
 .../content                                                  | 5 +++++
 .../status_code                                              | 1 +
 .../content                                                  | 5 +++++
 .../status_code                                              | 1 +
 .../content                                                  | 5 +++++
 .../status_code                                              | 1 +
 .../content                                                  | 5 +++++
 .../status_code                                              | 1 +
 memopol/urls.py                                              | 3 ++-
 11 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/status_code
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/status_code
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/status_code
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/status_code
 create mode 100644 memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/status_code

diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
index cc5c96c6..27eaf681 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/content
@@ -47,6 +47,11 @@
         Countries
       </a>
     </li>
+    <li>
+      <a href='/legislature/groups/chamber/'>
+        Chambers
+      </a>
+    </li>
     <li>
       <a href='/legislature/groups/group/'>
         Parties
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/status_code b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/status_code
new file mode 100644
index 00000000..ae4ee13c
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist/status_code
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
index fe9cb053..aefabd8b 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/content
@@ -47,6 +47,11 @@
         Countries
       </a>
     </li>
+    <li>
+      <a href='/legislature/groups/chamber/'>
+        Chambers
+      </a>
+    </li>
     <li>
       <a href='/legislature/groups/group/'>
         Parties
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/status_code b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/status_code
new file mode 100644
index 00000000..ae4ee13c
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby12_displaylist_searchjoly/status_code
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
index 1c75104f..3e0169f1 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/content
@@ -47,6 +47,11 @@
         Countries
       </a>
     </li>
+    <li>
+      <a href='/legislature/groups/chamber/'>
+        Chambers
+      </a>
+    </li>
     <li>
       <a href='/legislature/groups/group/'>
         Parties
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/status_code b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/status_code
new file mode 100644
index 00000000..ae4ee13c
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page1_paginateby24_displaygrid/status_code
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
index 826de2e4..64b25913 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/content
@@ -47,6 +47,11 @@
         Countries
       </a>
     </li>
+    <li>
+      <a href='/legislature/groups/chamber/'>
+        Chambers
+      </a>
+    </li>
     <li>
       <a href='/legislature/groups/group/'>
         Parties
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/status_code b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/status_code
new file mode 100644
index 00000000..ae4ee13c
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby12_displaylist/status_code
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
index dc37ecf2..35194afe 100644
--- a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/content
@@ -47,6 +47,11 @@
         Countries
       </a>
     </li>
+    <li>
+      <a href='/legislature/groups/chamber/'>
+        Chambers
+      </a>
+    </li>
     <li>
       <a href='/legislature/groups/group/'>
         Parties
diff --git a/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/status_code b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/status_code
new file mode 100644
index 00000000..ae4ee13c
--- /dev/null
+++ b/memopol/tests/response_fixtures/RepresentativeListTest.test_page2_paginateby24_displaylist/status_code
@@ -0,0 +1 @@
+200
\ No newline at end of file
diff --git a/memopol/urls.py b/memopol/urls.py
index 333ffb38..1f5931bc 100644
--- a/memopol/urls.py
+++ b/memopol/urls.py
@@ -11,7 +11,8 @@ admin.autodiscover()
 urlpatterns = [
     # Project-specific overrides
     url(
-        r'^legislature/representative/(?P<group_kind>\w+)/(?P<chamber>.+)/(?P<group>.+)/$',
+        r'^legislature/representative/(?P<group_kind>\w+)/(?P<chamber>.+)/' +
+        r'(?P<group>.+)/$',
         views.RepresentativeList.as_view(),
     ),
     url(
-- 
GitLab