Provides a Django TransactionTestCase.assertMaxNumQueries(), analogous to the existing TransactionTestCase.assertNumQueries()
Project description
Django AssertMaxNumQueries
- Provides a mixin and TransactionTestCase subclass with assertMaxNumQueries(),
analogous to django.test.TransactionTestCase.assertNumQueries
Free software: MIT license
Documentation: https://django-assertmaxnumqueries.readthedocs.io.
Usage
Usage is identical to django.test.TransactionTestCase.assertNumQueries , except check on the number of queries is assertLessEqual insert of assertEqual.
To use Django AssertMaxNumQueries in a project:
import django_assertmaxnumqueries
class MyTestCase(django_assertmaxnumqueries.TransactionTestCase):
def test_my_test(self):
with self.assertMaxNumQueries(2):
Person.objects.create(name="Aaron")
Person.objects.create(name="Daniel")
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2017-12-11)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_assertmaxnumqueries-0.1.2.tar.gz.
File metadata
- Download URL: django_assertmaxnumqueries-0.1.2.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30ce4102b54c4e33498392ab0ac37b558613285126aff1b098db174e3df6bf2b
|
|
| MD5 |
7d56528745f54b15c08a9fb6705095a2
|
|
| BLAKE2b-256 |
0c73882f39136cc4abe839880ba51360c437d482ed0eca3b1375a834a73cecaa
|
File details
Details for the file django_assertmaxnumqueries-0.1.2-py2.py3-none-any.whl.
File metadata
- Download URL: django_assertmaxnumqueries-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
324d45ced5a785a5e5fcb03bd0e5e790141ad35c98533b2ab0ad7e99e1428560
|
|
| MD5 |
0571f28e179170ee27f43a2742ed6449
|
|
| BLAKE2b-256 |
54cfc9b0e182fb9579e90dd742d347d12a7ae62a7e0679eaf8ad278d05886a2f
|