aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf
diff options
context:
space:
mode:
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):