base.py 631 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from django import test
from responsediff.test import ResponseDiffTestMixin


class BaseTest(ResponseDiffTestMixin, test.TestCase):
    fixtures = ['smaller_sample.json']

    """
    Common queries
    - One for chambers
    - One for countries
    - One for parties
    - One for committees
    - One for delegations
    """
    left_pane_queries = 5

Nicolas Joyard's avatar
Nicolas Joyard committed
18
19
20
    def request_test(self, url=None):
        self.assertResponseDiffEmpty(self.client.get(url or self.url))

Nicolas Joyard's avatar
Nicolas Joyard committed
21
22
23
    def selector_test(self, selector, url=None):
        self.assertResponseDiffEmpty(self.client.get(url or self.url),
                                     selector)