-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77230ea
commit 973ec53
Showing
4 changed files
with
109 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import unittest | ||
|
||
if __name__ == "__main__": | ||
unittest.main() |
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,59 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import django | ||
|
||
SECRET_KEY = "django-freeze" | ||
|
||
ALLOWED_HOSTS = ["*"] | ||
|
||
SITE_ID = 1 | ||
|
||
INSTALLED_APPS = [ | ||
"django.contrib.admin", | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.messages", | ||
"django.contrib.sessions", | ||
"django.contrib.sites", | ||
"freeze", | ||
] | ||
|
||
MIDDLEWARE = [ | ||
"django.middleware.security.SecurityMiddleware", | ||
"django.contrib.sessions.middleware.SessionMiddleware", | ||
"django.middleware.common.CommonMiddleware", | ||
"django.middleware.csrf.CsrfViewMiddleware", | ||
"django.contrib.auth.middleware.AuthenticationMiddleware", | ||
"django.contrib.messages.middleware.MessageMiddleware", | ||
"django.middleware.clickjacking.XFrameOptionsMiddleware", | ||
] | ||
|
||
if django.VERSION < (2, 0): | ||
MIDDLEWARE_CLASSES = MIDDLEWARE | ||
|
||
ROOT_URLCONF = "tests.urls" | ||
|
||
TEMPLATES = [ | ||
{ | ||
"BACKEND": "django.template.backends.django.DjangoTemplates", | ||
"DIRS": [], | ||
"APP_DIRS": True, | ||
"OPTIONS": { | ||
"context_processors": [ | ||
"django.template.context_processors.debug", | ||
"django.template.context_processors.request", | ||
"django.contrib.auth.context_processors.auth", | ||
"django.contrib.messages.context_processors.messages", | ||
], | ||
}, | ||
}, | ||
] | ||
|
||
DATABASES = { | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": ":memory:", | ||
}, | ||
} | ||
|
||
DEFAULT_AUTO_FIELD = "django.db.models.AutoField" |
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,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from django.test import TestCase | ||
|
||
|
||
class MetadataTestCase(TestCase): | ||
""" | ||
This class describes a metadata test case. | ||
""" | ||
|
||
def test_metadata(self): | ||
from freeze.metadata import ( | ||
__author__, | ||
__copyright__, | ||
__description__, | ||
__email__, | ||
__license__, | ||
__title__, | ||
__version__, | ||
) |
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,24 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import django | ||
|
||
if django.VERSION < (2, 0): | ||
from django.conf.urls import include, url as re_path | ||
else: | ||
from django.urls import include, re_path | ||
|
||
from freeze.views import download_static_site, generate_static_site | ||
|
||
|
||
urlpatterns = [ | ||
re_path( | ||
r"^download-static-site/$", | ||
download_static_site, | ||
name="freeze_download_static_site", | ||
), | ||
re_path( | ||
r"^generate-static-site/$", | ||
generate_static_site, | ||
name="freeze_generate_static_site", | ||
), | ||
] |