Skip to main content

Unobtrusive test models creation for django.

Project description

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/

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

django-whatever-es9iecor-0.2.3.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

django_whatever_es9iecor-0.2.3-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file django-whatever-es9iecor-0.2.3.tar.gz.

File metadata

  • Download URL: django-whatever-es9iecor-0.2.3.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for django-whatever-es9iecor-0.2.3.tar.gz
Algorithm Hash digest
SHA256 75657ece6af10fa8a90760db233d6f94d8fa0da3175522280576856a402b2da9
MD5 cbacf90033e4ea2812d7ac4c3fb8fad7
BLAKE2b-256 d4ca69cc45d36eee5c1190290b66d96de84f282c20b2ab61ace87d4315cbc95a

See more details on using hashes here.

File details

Details for the file django_whatever_es9iecor-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: django_whatever_es9iecor-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

File hashes

Hashes for django_whatever_es9iecor-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b7060f9d4523b617b314c2fcd2fef2043a832da45d02705e25d5c7903552bb83
MD5 6bc151cf69cadb50c7354d4db9d1f259
BLAKE2b-256 0d0ad188d3988e101acb09c98edd1a03cdec230866c3a3acfe57c0f3abb777d8

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