Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
memopol
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
32
Issues
32
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
memopol
Commits
949b7d0a
Commit
949b7d0a
authored
Aug 18, 2016
by
Nicolas Joyard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for rep search
parent
ec7d8d4a
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
130 additions
and
2 deletions
+130
-2
memopol/tests/base.py
memopol/tests/base.py
+3
-2
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_chamber.content
...res/RepresentativeListTest.test_search_by_chamber.content
+23
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_chamber.metadata
...es/RepresentativeListTest.test_search_by_chamber.metadata
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_committee.content
...s/RepresentativeListTest.test_search_by_committee.content
+15
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_committee.metadata
.../RepresentativeListTest.test_search_by_committee.metadata
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_country.content
...res/RepresentativeListTest.test_search_by_country.content
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_country.metadata
...es/RepresentativeListTest.test_search_by_country.metadata
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_delegation.content
.../RepresentativeListTest.test_search_by_delegation.content
+1
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_delegation.metadata
...RepresentativeListTest.test_search_by_delegation.metadata
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_name.content
...xtures/RepresentativeListTest.test_search_by_name.content
+15
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_name.metadata
...tures/RepresentativeListTest.test_search_by_name.metadata
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_party.content
...tures/RepresentativeListTest.test_search_by_party.content
+21
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_party.metadata
...ures/RepresentativeListTest.test_search_by_party.metadata
+3
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_no_results.content
...res/RepresentativeListTest.test_search_no_results.content
+0
-0
memopol/tests/response_fixtures/RepresentativeListTest.test_search_no_results.metadata
...es/RepresentativeListTest.test_search_no_results.metadata
+3
-0
memopol/tests/test_representative_list.py
memopol/tests/test_representative_list.py
+28
-0
No files found.
memopol/tests/base.py
View file @
949b7d0a
...
...
@@ -15,5 +15,6 @@ class BaseTest(ResponseDiffTestMixin, test.TestCase):
"""
left_pane_queries
=
5
def
selector_test
(
self
,
selector
):
self
.
assertResponseDiffEmpty
(
self
.
client
.
get
(
self
.
url
),
selector
)
def
selector_test
(
self
,
selector
,
url
=
None
):
self
.
assertResponseDiffEmpty
(
self
.
client
.
get
(
url
or
self
.
url
),
selector
)
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_chamber.content
0 → 100644
View file @
949b7d0a
<h4 class="text-center">Zigmantas BALČYTIS</h4>
---
<h4 class="text-center">Vilija BLINKEVIČIŪTĖ</h4>
---
<h4 class="text-center">Elmar BROK</h4>
---
<h4 class="text-center">Cristian-Silviu BUŞOI</h4>
---
<h4 class="text-center">David CASA</h4>
---
<h4 class="text-center">Jean-Marie CAVADA</h4>
---
<h4 class="text-center">Nikolaos CHOUNTIS</h4>
---
<h4 class="text-center">Michael CRAMER</h4>
---
<h4 class="text-center">Viorica DĂNCILĂ</h4>
---
<h4 class="text-center">Michel DANTIN</h4>
---
<h4 class="text-center">Tamás DEUTSCH</h4>
---
<h4 class="text-center">Bas EICKHOUT</h4>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_chamber.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_committee.content
0 → 100644
View file @
949b7d0a
<h4 class="text-center">Vilija BLINKEVIČIŪTĖ</h4>
---
<h4 class="text-center">Monika FLAŠÍKOVÁ BEŇOVÁ</h4>
---
<h4 class="text-center">Kinga GÁL</h4>
---
<h4 class="text-center">Iliana IOTOVA</h4>
---
<h4 class="text-center">Eva JOLY</h4>
---
<h4 class="text-center">Jarosław KALINOWSKI</h4>
---
<h4 class="text-center">Birgit SIPPEL</h4>
---
<h4 class="text-center">Cecilia WIKSTRÖM</h4>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_committee.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_country.content
0 → 100644
View file @
949b7d0a
<h4 class="text-center">Zigmantas BALČYTIS</h4>
---
<h4 class="text-center">Vilija BLINKEVIČIŪTĖ</h4>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_country.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_delegation.content
0 → 100644
View file @
949b7d0a
<h4 class="text-center">Eva JOLY</h4>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_delegation.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_name.content
0 → 100644
View file @
949b7d0a
<h4 class="text-center">Zigmantas BALČYTIS</h4>
---
<h4 class="text-center">Elmar BROK</h4>
---
<h4 class="text-center">Jean-Marie CAVADA</h4>
---
<h4 class="text-center">Tamás DEUTSCH</h4>
---
<h4 class="text-center">Ismail ERTUG</h4>
---
<h4 class="text-center">José Manuel FERNANDES</h4>
---
<h4 class="text-center">Marian HARKIN</h4>
---
<h4 class="text-center">Mary HONEYBALL</h4>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_name.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_party.content
0 → 100644
View file @
949b7d0a
<h4 class="text-center">Zigmantas BALČYTIS</h4>
---
<h4 class="text-center">Vilija BLINKEVIČIŪTĖ</h4>
---
<h4 class="text-center">Viorica DĂNCILĂ</h4>
---
<h4 class="text-center">Ismail ERTUG</h4>
---
<h4 class="text-center">Monika FLAŠÍKOVÁ BEŇOVÁ</h4>
---
<h4 class="text-center">Eider GARDIAZABAL RUBIAL</h4>
---
<h4 class="text-center">Mary HONEYBALL</h4>
---
<h4 class="text-center">Iliana IOTOVA</h4>
---
<h4 class="text-center">Liisa JAAKONSAARI</h4>
---
<h4 class="text-center">Olle LUDVIGSSON</h4>
---
<h4 class="text-center">Birgit SIPPEL</h4>
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_by_party.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/response_fixtures/RepresentativeListTest.test_search_no_results.content
0 → 100644
View file @
949b7d0a
memopol/tests/response_fixtures/RepresentativeListTest.test_search_no_results.metadata
0 → 100644
View file @
949b7d0a
{
"status_code": 200
}
\ No newline at end of file
memopol/tests/test_representative_list.py
View file @
949b7d0a
...
...
@@ -20,3 +20,31 @@ class RepresentativeListTest(BaseTest):
def
test_cards
(
self
):
self
.
selector_test
(
'.representative-card'
)
def
test_search_no_results
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?search=non-existing'
%
self
.
url
)
def
test_search_by_name
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?search=ma'
%
self
.
url
)
def
test_search_by_chamber
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?chamber=1'
%
self
.
url
)
def
test_search_by_country
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?country=145'
%
self
.
url
)
def
test_search_by_party
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?party=21'
%
self
.
url
)
def
test_search_by_committee
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?committee=7'
%
self
.
url
)
def
test_search_by_delegation
(
self
):
self
.
selector_test
(
'.representative-card h4'
,
'%s?delegation=95'
%
self
.
url
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment