No project description provided
Project description
django-dreiattest
dreiattest leverages the pyttest and integrating it to django. It handles routing, different config options and persistence of tokens and public keys
Installation
pyattest is available on PyPI and can be installed via $ python -m pip install dreiattest-django
.
After the installation make sure to add dreiattest
to your INSTALLED_APPS
and trigger all migrations
with python manage.py migrate dreiattest
. Also, you need to register the default endpoints in your urls.py
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('dreiattest.urls')),
...
]
Usage
In your settings.py, make sure to set the correct Apple AppId as well as the environment you want to test in.
DREIATTEST_APPLE_APPID = '5LVDC4HW22.ch.dreipol.dreiattestTestHost' DREIATTEST_PRODUCTION = False
There are more advanced settings you can find in dreiattest/settings.py
All that's left is to add the signature_required
view decorator
from dreiattest.decorators import signature_required
@signature_required()
def demo(request: WSGIRequest):
return JsonResponse({'foo': 'bar'})
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
Hashes for django_dreiattest-0.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5b636c65d6e22c2a0ee7dccfd30cd5abcec9195dd5bbbbcf078419757be98c0 |
|
MD5 | 0beb628c01ea8f49b991aebcc744bab4 |
|
BLAKE2b-256 | 8c67c80ef27e0922743116d9911592e4d580ed536b9b14e678c47573e6738578 |