test_navigation_pane.py 896 Bytes
Newer Older
1
from .base import BaseTest
Nicolas Joyard's avatar
Nicolas Joyard committed
2 3


4
class NavigationPaneTest(BaseTest):
Nicolas Joyard's avatar
Nicolas Joyard committed
5 6
    url = '/'

7
    def test_queries(self):
8 9 10 11 12
        # First query to set session variables
        self.client.get(self.url)

        with self.assertNumQueries(self.left_pane_queries):
            self.client.get(self.url)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

    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')