-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom header X-Perimeter-Token to bypass perimeter (#21)
Adds a custom HTTP header to enable requests to bypass the perimeter.
- Loading branch information
1 parent
25b507d
commit bef8a3b
Showing
9 changed files
with
102 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
dist: | ||
xenial # required for SQLite3 3.8.3 | ||
language: | ||
python | ||
python: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
coverage = "*" | ||
black = "*" | ||
pylint = "*" | ||
|
||
[packages] | ||
# django-perimeter = {editable = true,path = "."} | ||
django = "*" | ||
|
||
[requires] | ||
python_version = "3" | ||
|
||
[pipenv] | ||
allow_prereleases = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os | ||
import sys | ||
|
||
import django | ||
from django.conf import settings | ||
from django.test.utils import get_runner | ||
|
||
if __name__ == "__main__": | ||
os.environ["DJANGO_SETTINGS_MODULE"] = "test_app.settings" | ||
django.setup() | ||
TestRunner = get_runner(settings) | ||
test_runner = TestRunner() | ||
failures = test_runner.run_tests(["perimeter.tests"]) | ||
sys.exit(bool(failures)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
[tox] | ||
envlist = py{36}-django{111,20} | ||
envlist = py{36,37}-django{111,20,21,22} | ||
|
||
[testenv] | ||
deps = | ||
coverage | ||
django111: Django==1.11 | ||
django20: Django==2.0 | ||
django21: Django==2.1 | ||
django22: Django==2.2 | ||
|
||
commands= | ||
python --version | ||
coverage erase | ||
coverage run --include=perimeter/* manage.py test perimeter | ||
coverage run --include=perimeter/* runtests.py | ||
coverage report -m |