django-whatever 0.2.3

Unobtrusive test models creation for django.

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/

MIT License

Author

Ilya Baryshev

Pip

django-whatever==0.2.3

Classifiers

  • Programming Language :: Python
  • Operating System :: OS Independent
  • License :: OSI Approved :: MIT License
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 3 - Alpha
File Type Python Version Uploaded On Downloads
django-whatever-0.2.3.tar.gz Source Jan. 22, 2012 10,451
Version Release Date
0.2.3 Jan. 22, 2012
0.2.2 Jan. 11, 2012
0.2.1 Dec. 24, 2011
0.2.0 Dec. 19, 2011
0.1.0 Oct. 17, 2011
Date Package Version Action
Nov. 4, 2014, 2:04 p.m. django-whatever 0.2.0 Release Created
Nov. 4, 2014, 2:04 p.m. django-whatever 0.2.1 Release Created
Nov. 4, 2014, 2:04 p.m. django-whatever 0.2.2 Release Created
Nov. 4, 2014, 2:04 p.m. django-whatever 0.2.3 Release Created
Nov. 4, 2014, 2:04 p.m. django-whatever 0.1.0 Release Created
Nov. 4, 2014, 2:04 p.m. django-whatever Package Created