Unobtrusive test models creation for django
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
Metadata
Release files for django-any 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-any-0.2.0.tar.gz | 13.4 kB | Without provenance | Details |
Release files / django-any-0.2.0.tar.gz
| Download URL | django-any-0.2.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74e631fccc4964a804f0e2f0c392bce13b36633d8199aad1f49e0c215e227059
|
|
BLAKE2b-256 checksum How to use checksums |
11a0d1de9136e7193b78f2dc6ed2bf8c0e4bf8e7d0485ede124a14d67d9e417c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-any 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.