[Unmaintained] Unobtrusive test models creation for django
Python HTML
Pull request Compare This branch is 91 commits ahead of kmmbvnr:master.
Latest commit 7d159ea Dec 28, 2016 @GeyseR GeyseR committed on GitHub Merge pull request #57 from hovel/fix_any_date
Fix default args for any_date and any_datetime
Permalink
Failed to load latest commit information.
.idea/dictionaries Added ability to login as arbitrary user Jan 11, 2012
django_any fix default args for any_date and any_datetime Dec 27, 2016
docs add python3 compatibility Dec 7, 2016
tests add python3 compatibility Dec 7, 2016
.gitignore
.travis.yml add python3 compatibility Dec 7, 2016
AUTHORS
LICENSE Updated setup.py and LICENCE Dec 23, 2011
MANIFEST.in Minor docs fixes Oct 17, 2011
README.rst This package is no longer maintained Jan 5, 2013
setup.cfg
setup.py add python3 compatibility Dec 7, 2016
tox.ini add python3 compatibility Dec 7, 2016

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/