This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Unobtrusive test models creation for django.

Project Description

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

django-any allows to specify only fields important for test, and fill rest by random with acceptable values.

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

from django_any import any_model, WithTestDataSeed

class TestMyShop(TestCase):
    __metaclass__ = WithTestDataSeed

    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)

The same approach available for forms also (django_any.any_form)

See docs/quickstart.txt for more details

Release History

Release History

This version
History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-any-0.2.0.tar.gz (13.4 kB) Copy SHA256 Checksum SHA256 Source Feb 23, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting