Example #1
0
    def _test_filter(self, spec, expected):
        backend = PlainFilterBackend(DATA)
        backend.bind([spec])

        assert backend.filter() == expected
Example #2
0
    def test_empty(self):
        backend = PlainFilterBackend([])

        assert backend.empty() == []
Example #3
0
    def test_filter_no_specs(self):
        qs = ["hello"]
        backend = PlainFilterBackend(qs)
        backend.bind([])

        assert backend.filter() is qs
Example #4
0
    def test_get_model(self):
        backend = PlainFilterBackend([])

        assert backend.get_model() is object
        assert not backend.enforce_same_models
    def _test_filter(self, spec, expected):
        backend = PlainFilterBackend(DATA)
        backend.bind([spec])

        assert backend.filter() == expected
    def test_filter_no_specs(self):
        qs = ['hello']
        backend = PlainFilterBackend(qs)
        backend.bind([])

        assert backend.filter() is qs
    def test_empty(self):
        backend = PlainFilterBackend([])

        assert backend.empty() == []
    def test_get_model(self):
        backend = PlainFilterBackend([])

        assert backend.get_model() is object
        assert not backend.enforce_same_models