Commit 83b5c959 authored by Nicolas Joyard's avatar Nicolas Joyard

Update tests

parent f451d81c
......@@ -9,14 +9,8 @@ class BaseTest(ResponseDiffTestMixin, test.TestCase):
"""
Common queries
- 1 for settings
- 5 for search forms
- 1 for chambers
- 1 for countries
- 1 for parties
- 1 for committees
- 1 for delegations
"""
left_pane_queries = 6
left_pane_queries = 1
def setUp(self):
RepresentativeScore.refresh()
......
<option value="">All</option>
---
<option value="1">
European Parliament
</option>
---
<option value="2">
Assemblée nationale
</option>
---
<option value="3">
Sénat
</option>
\ No newline at end of file
<option value="">All</option>
---
<option value="1">
European Parliament
</option>
---
<option value="2">
Assemblée nationale
</option>
---
<option value="3">
Sénat
</option>
\ No newline at end of file
<option value="">All</option>
---
<option data-url="/representatives/?committee=345" value="345">
AnComImmu –
Commission chargée de l'application de l'article 26 de la constitution
</option>
---
<option data-url="/representatives/?committee=274" value="274">
AnComDef –
Commission de la défense nationale et des forces armées
</option>
---
<option data-url="/representatives/?committee=387" value="387">
Commission d'enquête relative aux moyens mis en œuvre par l'État pour lutter contre le terrorisme depuis le 7 janvier
</option>
---
<option data-url="/representatives/?committee=876" value="876">
Commission d'enquête sur les conditions d'abattage des animaux de boucherie dans les abattoirs français
</option>
---
<option data-url="/representatives/?committee=484" value="484">
Commission d'enquête sur les conditions d'octroi d'une autorisation d'émettre à la chaîne numéro 23 et de sa vente
</option>
---
<option data-url="/representatives/?committee=1297" value="1297">
Commission d'enquête visant à évaluer les conséquences sur l'investissement public et les services publics de proximité de la baisse des dotations de l'État aux communes et aux epci
</option>
---
<option data-url="/representatives/?committee=335" value="335">
AnComCult –
Commission des affaires culturelles et de l'éducation
</option>
---
<option data-url="/representatives/?committee=427" value="427">
AnComEco –
Commission des affaires économiques
</option>
---
<option data-url="/representatives/?committee=285" value="285">
AnComEtrg –
Commission des affaires étrangères
</option>
---
<option data-url="/representatives/?committee=364" value="364">
AnComEU –
Commission des affaires européennes
</option>
---
<option data-url="/representatives/?committee=365" value="365">
AnComSoc –
Commission des affaires sociales
</option>
---
<option data-url="/representatives/?committee=401" value="401">
AnComFin –
Commission des finances, de l'économie générale et du contrôle budgétaire
</option>
---
<option data-url="/representatives/?committee=530" value="530">
AnComLois –
Commission des lois constitutionnelles, de la législation et de l'administration générale de la république
</option>
---
<option data-url="/representatives/?committee=423" value="423">
AnComDevD –
Commission du développement durable et de l'aménagement du territoire
</option>
---
<option data-url="/representatives/?committee=346" value="346">
Commission spéciale chargée d'examiner le projet de loi Égalité et citoyenneté
</option>
---
<option data-url="/representatives/?committee=1622" value="1622">
Commission spéciale chargée d'examiner le projet de loi pour la croissance et l'activité
</option>
---
<option data-url="/representatives/?committee=286" value="286">
Commission spéciale pour l'examen de la proposition de loi renforçant la lutte contre le système prostitutionnel
</option>
---
<option data-url="/representatives/?committee=47" value="47">
AGRI –
Committee on Agriculture and Rural Development
</option>
---
<option data-url="/representatives/?committee=89" value="89">
CONT –
Committee on Budgetary Control
</option>
---
<option data-url="/representatives/?committee=34" value="34">
BUDG –
Committee on Budgets
</option>
---
<option data-url="/representatives/?committee=7" value="7">
LIBE –
Committee on Civil Liberties, Justice and Home Affairs
</option>
---
<option data-url="/representatives/?committee=37" value="37">
AFCO –
Committee on Constitutional Affairs
</option>
---
<option data-url="/representatives/?committee=20" value="20">
CULT –
Committee on Culture and Education
</option>
---
<option data-url="/representatives/?committee=8" value="8">
DEVE –
Committee on Development
</option>
---
<option data-url="/representatives/?committee=30" value="30">
ECON –
Committee on Economic and Monetary Affairs
</option>
---
<option data-url="/representatives/?committee=3" value="3">
EMPL –
Committee on Employment and Social Affairs
</option>
---
<option data-url="/representatives/?committee=55" value="55">
PECH –
Committee on Fisheries
</option>
---
<option data-url="/representatives/?committee=5" value="5">
AFET –
Committee on Foreign Affairs
</option>
---
<option data-url="/representatives/?committee=23" value="23">
ITRE –
Committee on Industry, Research and Energy
</option>
---
<option data-url="/representatives/?committee=49" value="49">
INTA –
Committee on International Trade
</option>
---
<option data-url="/representatives/?committee=9" value="9">
JURI –
Committee on Legal Affairs
</option>
---
<option data-url="/representatives/?committee=6" value="6">
PETI –
Committee on Petitions
</option>
---
<option data-url="/representatives/?committee=24" value="24">
REGI –
Committee on Regional Development
</option>
---
<option data-url="/representatives/?committee=48" value="48">
ENVI –
Committee on the Environment, Public Health and Food Safety
</option>
---
<option data-url="/representatives/?committee=58" value="58">
IMCO –
Committee on the Internal Market and Consumer Protection
</option>
---
<option data-url="/representatives/?committee=68" value="68">
TRAN –
Committee on Transport and Tourism
</option>
---
<option data-url="/representatives/?committee=77" value="77">
FEMM –
Committee on Women's Rights and Gender Equality
</option>
---
<option data-url="/representatives/?committee=61" value="61">
CRIS –
Special Committee on the Financial, Economic and Social Crisis
</option>
---
<option data-url="/representatives/?committee=50" value="50">
SURE –
Special committee on the policy challenges and budgetary resources for a sustainable European Union after 2013
</option>
---
<option data-url="/representatives/?committee=4" value="4">
DROI –
Subcommittee on Human Rights
</option>
\ No newline at end of file
<option value="">All</option>
---
<option value="98">
BE –
Belgium
</option>
---
<option value="88">
CZ –
Czech Republic
</option>
---
<option value="110">
FR –
France
</option>
---
<option value="22">
DE –
Germany
</option>
---
<option value="85">
HU –
Hungary
</option>
---
<option value="100">
IT –
Italy
</option>
---
<option value="93">
LV –
Latvia
</option>
---
<option value="57">
NL –
Netherlands
</option>
---
<option value="2">
PL –
Poland
</option>
---
<option value="19">
RO –
Romania
</option>
---
<option value="91">
ES –
Spain
</option>
---
<option value="33">
GB –
United Kingdom
</option>
\ No newline at end of file
<option value="">All</option>
---
<option value="42">
GUE/NGL –
Confederal Group of the European United Left - Nordic Green Left
</option>
---
<option value="43">
GUE/NGL –
Confederal Group of the European United Left/Nordic Green Left
</option>
---
<option value="1">
ECR –
European Conservatives and Reformists Group
</option>
---
<option value="71">
EFD –
Europe of freedom and democracy Group
</option>
---
<option value="31">
EFDD –
Europe of Freedom and Direct Democracy Group
</option>
---
<option value="1035">
GDR –
Gauche démocrate et républicaine
</option>
---
<option value="17">
ALDE –
Group of the Alliance of Liberals and Democrats for Europe
</option>
---
<option value="104">
EPP –
Group of the European People's Party (Christian-Democratic Group)
</option>
---
<option value="18">
EPP –
Group of the European People's Party (Christian Democrats)
</option>
---
<option value="54">
PPE-DE –
Group of the European People's Party (Christian Democrats) and European Democrats
</option>
---
<option value="84">
Greens/EFA –
Group of the Greens/European Free Alliance
</option>
---
<option value="67">
PSE –
Group of the Party of European Socialists
</option>
---
<option value="21">
SD –
Group of the Progressive Alliance of Socialists and Democrats in the European Parliament
</option>
---
<option value="76">
IND/DEM –
Independence/Democracy Group
</option>
---
<option value="44">
LU –
Left Unity
</option>
---
<option value="271">
LR –
Les républicains
</option>
---
<option value="32">
NI –
Non-attached Members
</option>
---
<option value="332">
SER –
Socialiste, écologiste et républicain
</option>
---
<option value="282">
Socialiste, républicain et citoyen
</option>
---
<option value="41">
PSE –
Socialist Group in the European Parliament
</option>
---
<option value="398">
UDI –
Union des démocrates et indépendants
</option>
---
<option value="75">
UEN –
Union for Europe of the Nations Group
</option>
---
<option value="1620">
Union pour la démocratie française-alliance
</option>
\ No newline at end of file
from .base import BaseTest
class NavigationPaneTest(BaseTest):
class HomeTest(BaseTest):
url = '/'
def test_queries(self):
......@@ -22,30 +22,10 @@ class NavigationPaneTest(BaseTest):
- 1 for prefetching latest votes dossier documents chambers
- 1 for Featured themes
- 1 for featured themes
- 0 for Chambers
- 1 for Chambers
- 1 for chambers and dossier/proposal counts
=> note: django optimizes out the chamber query for left pane
forms so this one actually does not add 1 to query count
"""
home_queries = 10
home_queries = 11
with self.assertNumQueries(self.left_pane_queries + home_queries):
self.client.get(self.url)
def test_rep_search_chambers(self):
self.selector_test('#form-rep #chamber-rep option')
def test_rep_search_countries(self):
self.selector_test('#form-rep #country option')
def test_rep_search_parties(self):
self.selector_test('#form-rep #party option')
def test_rep_search_committee(self):
self.selector_test('#form-rep #committee option')
def test_rep_search_delegation(self):
self.selector_test('#form-rep #delegation option')
def test_dossier_search_chambers(self):
self.selector_test('#form-dossier #chamber-dossier option')
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