A simple library for mocking certain Django behavior, such as the ORM.
>>> from django.conf import settings >>> settings.configure() # required to convince Django it's properly configured >>> from mock_django.query import QuerySetMock >>> class Post(object): pass ... >>> qs = QuerySetMock(Post, 1, 2, 3) >>> list(qs.all()) [1, 2, 3] >>> qs.count() 3 >>> list(qs.all().filter()) [1, 2, 3]
See tests for more examples.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4