Skip to content
This repository

[Unmaintained] Unobtrusive test models creation for django

branch: master

This branch is 0 commits ahead and 0 commits behind master

pass all errors when can't import

For example we cant import django specific models (e.g. ContentType) during installation when obtain current version of app
latest commit 54b0a22ebb
Sergey Fursov GeyseR authored January 28, 2014
Octocat-spinner-32 .idea Added ability to login as arbitrary user January 11, 2012
Octocat-spinner-32 django_any pass all errors when can't import January 28, 2014
Octocat-spinner-32 docs Added docs for custom fields generators using parent generators. January 22, 2012
Octocat-spinner-32 tests required secret_key in test May 05, 2013
Octocat-spinner-32 .gitignore Small fixes to contrib docs. Docs are now on pypi December 24, 2011
Octocat-spinner-32 .travis.yml Travis yaml February 28, 2012
Octocat-spinner-32 AUTHORS Added docs for custom fields generators using parent generators. January 22, 2012
Octocat-spinner-32 LICENSE Updated setup.py and LICENCE December 23, 2011
Octocat-spinner-32 MANIFEST.in Minor docs fixes October 17, 2011
Octocat-spinner-32 README.rst This package is no longer maintained January 06, 2013
Octocat-spinner-32 setup.cfg Small fixes to contrib docs. Docs are now on pypi December 24, 2011
Octocat-spinner-32 setup.py django-whatever is no longer maintained January 06, 2013
README.rst

Unobtrusive test models creation for django

This package is no longer maintained. If you would like to take over, contact me pls.

django-whatever is a friendly fork of django-any package written by Mikhail Podgurskiy (kmmbvnr) The purpose of the fork is to fix most annoying bugs and add some features To remain compatible with original package django-whatever retains same namespace: django_any.

django-whatever is explicit replacement for old-style, big and error-prone implicit fixture files.

django-whatever allows you to specify only fields important for tests and fills the rest randomly with acceptable values.

It makes tests clean and easy to understand, without reading fixture files.:

from django_any import any_model

class TestMyShop(TestCase):
    def test_order_updates_user_account(self):
        account = any_model(Account, amount=25, user__is_active=True)
        order = any_model(Order, user=account.user, amount=10)
        order.proceed()

        account = Account.objects.get(pk=account.pk)
        self.assertEquals(15, account.amount)

Read more at the docs: http://django-whatever.readthedocs.org/

Something went wrong with that request. Please try again.