UNKNOWN
Project description
A simple library for mocking certain Django behavior, such as the ORM.
Using mock-django objects
Inside your virtualenv:
>>> 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size mock_django-0.6.10-py2-none-any.whl (7.4 kB) | File type Wheel | Python version 2.7 | Upload date | Hashes View |
Filename, size mock-django-0.6.10.tar.gz (4.8 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for mock_django-0.6.10-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5234eb8ebcd94c004a1f4e57711c312acf5f3134f5d30239f7389b1401f13658 |
|
MD5 | 2ada45c343a53e3375fcf90a68abe271 |
|
BLAKE2-256 | a5f6706506e321185c74749bd503ae75e1a1a7dfc3aa0a164eb4df2535632af3 |