-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Django 2.0 and Python 3 support
- Loading branch information
Showing
6 changed files
with
45 additions
and
41 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
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,21 @@ | ||
SECRET_KEY = "secret!" | ||
|
||
ROOT_URLCONF='acme_challenge.urls' | ||
|
||
DATABASES={ | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
} | ||
} | ||
|
||
INSTALLED_APPS=( | ||
'acme_challenge', | ||
) | ||
|
||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'APP_DIRS': 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,15 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
import django | ||
from django.conf import settings | ||
from django.test.utils import get_runner | ||
|
||
|
||
def main(): | ||
settings.configure( | ||
DATABASES={ | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
} | ||
}, | ||
ROOT_URLCONF='acme_challenge.urls', | ||
INSTALLED_APPS=( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.admin', | ||
'acme_challenge',) | ||
) | ||
|
||
if __name__ == "__main__": | ||
os.environ['DJANGO_SETTINGS_MODULE'] = 'acme_challenge.tests.test_settings' | ||
django.setup() | ||
try: | ||
# Django <= 1.8 | ||
from django.test.simple import DjangoTestSuiteRunner | ||
test_runner = DjangoTestSuiteRunner(verbosity=1) | ||
except ImportError: | ||
# Django >= 1.8 | ||
from django.test.runner import DiscoverRunner | ||
test_runner = DiscoverRunner(verbosity=1) | ||
|
||
failures = test_runner.run_tests(['acme_challenge']) | ||
if failures: | ||
sys.exit(failures) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
TestRunner = get_runner(settings) | ||
test_runner = TestRunner() | ||
failures = test_runner.run_tests(["acme_challenge"]) | ||
sys.exit(bool(failures)) |