Skip to main content

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.

Testing

Build Status

tox

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mock-django-0.6.10.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

mock_django-0.6.10-py2-none-any.whl (7.4 kB view details)

Uploaded Python 2

File details

Details for the file mock-django-0.6.10.tar.gz.

File metadata

File hashes

Hashes for mock-django-0.6.10.tar.gz
Algorithm Hash digest
SHA256 02f052c9f9545945349f7e0c61b1626373ea291100886775413289099011d22b
MD5 0f8dae8060a7a3eda42a79711edff0bd
BLAKE2b-256 c544fcef37a4a96b8a9915a9d9745d6021ae3778d1f435707075e60a09d24347

See more details on using hashes here.

File details

Details for the file mock_django-0.6.10-py2-none-any.whl.

File metadata

File hashes

Hashes for mock_django-0.6.10-py2-none-any.whl
Algorithm Hash digest
SHA256 5234eb8ebcd94c004a1f4e57711c312acf5f3134f5d30239f7389b1401f13658
MD5 2ada45c343a53e3375fcf90a68abe271
BLAKE2b-256 a5f6706506e321185c74749bd503ae75e1a1a7dfc3aa0a164eb4df2535632af3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page