def _test_filter(self, spec, expected): backend = PlainFilterBackend(DATA) backend.bind([spec]) assert backend.filter() == expected
def test_empty(self): backend = PlainFilterBackend([]) assert backend.empty() == []
def test_filter_no_specs(self): qs = ["hello"] backend = PlainFilterBackend(qs) backend.bind([]) assert backend.filter() is qs
def test_get_model(self): backend = PlainFilterBackend([]) assert backend.get_model() is object assert not backend.enforce_same_models
def test_filter_no_specs(self): qs = ['hello'] backend = PlainFilterBackend(qs) backend.bind([]) assert backend.filter() is qs