Django Logon TestCase
Simple enhancement to the TestCase which creates user and loggs him in.
Documentation
The full documentation is at https://django-logon-testcase.readthedocs.io.
Quickstart
Install Django Logon TestCase:
pip install django-logon-testcase
Use it in your tests:
from django.test import TestCase
from logon_testcase import LogonMixin
class MyTestCase(LogonMixin, TestCase):
...
The logged user is available in self.user variable.
Features
You can get your own user for the test by overriding get_user function:
class MyTestCase(LogonMixin):
def get_user(self):
return User.objects.create()
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
History
0.1.0 (2017-08-10)
First release on PyPI.
Metadata
Release files for django-logon-testcase 0.1.1
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 | Actions |
|---|---|---|---|---|
| django-logon-testcase-0.1.1.tar.gz | 14.9 kB | Without provenance | Details for django-logon-testcase-0.1.1.tar.gz |
Release files / django-logon-testcase-0.1.1.tar.gz
| Download URL | django-logon-testcase-0.1.1.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f7b710d83cd975ff5e31afa8059a4f7b7256b71637e1271725bfde4dab5f6d5d
|
|
BLAKE2b-256 checksum How to use checksums |
39bb2f09ffa0b9b8818526d19a5ba4d3de56538cbd9f40458a27d1e73cd54717
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-logon-testcase 0.1.1
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.