Socket
Socket
Sign inDemoInstall

anfema-django-testutils

Package Overview
Dependencies
7
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    anfema-django-testutils

Testrunner for django which covers html report and code coverage


Maintainers
1

Readme

anfema-django-testutils

The main intention of the anfema_django_testutils app is to provide a Django test runner which considers snapshot tests as well as code coverage and human-readable html test reports. Moreover, the test result Precondition Failure has been added.

This package integrates snapshottest as well as coverage.

Prerequisites

anfema_django_testutils is officially supported on:

  • Python >= 3.9
  • Django >= 3.2

Installation

$ pip install anfema-django-testutils

Setting up

Update your Django settings.py to use the anfema_django_testutils test runner:

# settings.py

INSTALLED_APPS = [
    ...
    "mathfilters",
    "anfema_django_testutils",
]

TEST_RUNNER = "anfema_django_testutils.runner.TestRunner"

For further information see the anfema_django_testutils documentation.

Usage

For writing test cases use the anfema_django_testutils.testcases.TestCase rather than the django.test.TestCase:

# app/tests.py

from anfema_django_testutils.testcases import TestCase


class CustomTest(TestCase):
    ...

Create documentation

To generate the anfema_django_testutils documentation from the local sources, run in a terminal:

$ pip install tox
$ tox -e docs -- docs/build

Run tests

To execute the anfema_django_testutils tests, run in a terminal:

$ pip install tox
$ tox

License

Licensed under the MIT-clause license; see LICENSE for details.

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc