Smoke tests for Django project.
Project description
Smoke tests for Django project.
Requirements
Python (2.7, 3.4, 3.5, 3.6)
Django (1.8, 1.9, 1.10, 1.11)
Installation
Install using pip:
pip install django-smoke-tests
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'django_smoke_tests',
...
)
Quickstart
Execute smoke tests for the whole project:
python manage.py smoke_tests
Usage
Parameters
$ python manage.py smoke_tests --help usage: manage.py smoke_tests [-h] [--http-methods HTTP_METHODS] [--allow-status-codes ALLOW_STATUS_CODES] [--disallow-status-codes DISALLOW_STATUS_CODES] [--no-db] [app_names] Smoke tests for Django endpoints. positional arguments: app_names names of apps to test optional arguments: -h, --help show this help message and exit --http-methods HTTP_METHODS comma separated HTTP methods that will be executed for all endpoints, eg. GET,POST,DELETE [default: GET,POST,PUT,DELETE] --allow-status-codes ALLOW_STATUS_CODES comma separated HTTP status codes that will be considered as success responses, eg. 200,201,204 [default: 200,201,301,302,304,405] --disallow-status-codes DISALLOW_STATUS_CODES comma separated HTTP status codes that will be considered as fail responses, eg. 404,500 --no-db flag for skipping database creation
Skipping tests
To skip tests for specific URLs add SKIP_SMOKE_TESTS option in your settings.
This setting should contain list of URLs’ names.
SKIP_SMOKE_TESTS = (
'all-astronauts', # to skip url(r'^astronauts/', AllAstronauts.as_view(), name='all-astronauts')
)
Reporting bugs
If you face any problems please report them to the issue tracker at https://github.com/kamilkijak/django-smoke-tests/issues
Contributing
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Tools used in rendering this package:
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
django-smoke-tests-0.1.0.tar.gz
(10.2 kB
view details)
File details
Details for the file django-smoke-tests-0.1.0.tar.gz
.
File metadata
- Download URL: django-smoke-tests-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
94e7206dbc081f034a67d49f207004bcf158eeeeadbf6c2de59fbe18f8b95cff
|
|
MD5 |
0b79877971f57b5c4a7f986988f7b704
|
|
BLAKE2b-256 |
157015dc00a3f54bc390893ed10eb4d0c67491a467cb049b89efa88c484909f9
|