aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2012-08-03 10:42:20 +0100
committerMarc Tamlyn <marc.tamlyn@gmail.com>2012-08-03 10:42:20 +0100
commit9fc1d90c7db78d95b9c3b9a8d0329b472b8a4280 (patch)
treed0a366e7d4a0d5bec761ff7418e6f59cfbf43805 /wkhtmltopdf
parentdc9f1fb46f587f2b8dbbfc440a72944b183c0fcd (diff)
downloaddjango-wkhtmltopdf-9fc1d90c7db78d95b9c3b9a8d0329b472b8a4280.tar.gz
django-wkhtmltopdf-9fc1d90c7db78d95b9c3b9a8d0329b472b8a4280.tar.bz2
django-wkhtmltopdf-9fc1d90c7db78d95b9c3b9a8d0329b472b8a4280.zip
Move tests into wkhtmltopdf.tests.*
Fixes #11.
Diffstat (limited to 'wkhtmltopdf')
-rw-r--r--wkhtmltopdf/test_settings.py16
-rw-r--r--wkhtmltopdf/tests/__init__.py0
-rw-r--r--wkhtmltopdf/tests/models.py0
-rw-r--r--wkhtmltopdf/tests/templates/footer.html2
-rw-r--r--wkhtmltopdf/tests/templates/sample.html7
-rw-r--r--wkhtmltopdf/tests/tests.py (renamed from wkhtmltopdf/tests.py)6
6 files changed, 28 insertions, 3 deletions
diff --git a/wkhtmltopdf/test_settings.py b/wkhtmltopdf/test_settings.py
new file mode 100644
index 0000000..37d086f
--- /dev/null
+++ b/wkhtmltopdf/test_settings.py
@@ -0,0 +1,16 @@
+DEBUG = True
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': ':memory:',
+ }
+}
+
+MEDIA_URL = ''
+STATIC_URL = ''
+
+INSTALLED_APPS = (
+ 'wkhtmltopdf.tests',
+ 'wkhtmltopdf',
+)
diff --git a/wkhtmltopdf/tests/__init__.py b/wkhtmltopdf/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/wkhtmltopdf/tests/__init__.py
diff --git a/wkhtmltopdf/tests/models.py b/wkhtmltopdf/tests/models.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/wkhtmltopdf/tests/models.py
diff --git a/wkhtmltopdf/tests/templates/footer.html b/wkhtmltopdf/tests/templates/footer.html
new file mode 100644
index 0000000..3ae09cb
--- /dev/null
+++ b/wkhtmltopdf/tests/templates/footer.html
@@ -0,0 +1,2 @@
+MEDIA_URL = {{ MEDIA_URL }}
+STATIC_URL = {{ STATIC_URL }}
diff --git a/wkhtmltopdf/tests/templates/sample.html b/wkhtmltopdf/tests/templates/sample.html
new file mode 100644
index 0000000..3dfbdbb
--- /dev/null
+++ b/wkhtmltopdf/tests/templates/sample.html
@@ -0,0 +1,7 @@
+<html>
+ <head>
+ </head>
+ <body>
+ <h1>{{ title }}</h1>
+ </body>
+</html>
diff --git a/wkhtmltopdf/tests.py b/wkhtmltopdf/tests/tests.py
index cd0213d..6d8f3ac 100644
--- a/wkhtmltopdf/tests.py
+++ b/wkhtmltopdf/tests/tests.py
@@ -8,9 +8,9 @@ import sys
from django.test import TestCase
from django.test.client import RequestFactory
-from .subprocess import CalledProcessError
-from .utils import override_settings, _options_to_args, wkhtmltopdf
-from .views import PDFResponse, PDFTemplateView, PDFTemplateResponse
+from wkhtmltopdf.subprocess import CalledProcessError
+from wkhtmltopdf.utils import override_settings, _options_to_args, wkhtmltopdf
+from wkhtmltopdf.views import PDFResponse, PDFTemplateView, PDFTemplateResponse
class TestUtils(TestCase):