Skip to main content

Provides a Django TransactionTestCase.assertMaxNumQueries(), analogous to the existing TransactionTestCase.assertNumQueries()

Project description

Django AssertMaxNumQueries Documentation Status Updates
Provides a mixin and TransactionTestCase subclass with assertMaxNumQueries(),
analogous to django.test.TransactionTestCase.assertNumQueries


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):


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.1.0 (2017-12-11)

  • First release on PyPI.

Project details

Download files

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

Files for django-assertmaxnumqueries, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size django_assertmaxnumqueries-0.1.2-py2.py3-none-any.whl (4.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django_assertmaxnumqueries-0.1.2.tar.gz (14.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page