def test_get_backend(self): class Foo(object): pass be = get_backend(Foo()) assert isinstance(be, ObjectsBackend)
def test_get_backend(self): assert isinstance(get_backend(QuerySet()), DjangoBackend) assert isinstance(get_backend(Manager()), DjangoBackend)
def apply(self, iterable): backend = get_backend(iterable) return backend.apply(self, iterable)