FIX: dav_base: fix wrong static base url in TemplatesTestCase.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from django.conf import settings
|
||||
from django.test import SimpleTestCase
|
||||
|
||||
|
||||
@@ -14,24 +15,27 @@ class TemplatesTestCase(SimpleTestCase):
|
||||
def test_html_head(self):
|
||||
response = self.response_from_root_view
|
||||
|
||||
static_url = settings.STATIC_URL
|
||||
|
||||
html_needles = (
|
||||
# favicon
|
||||
'<link type="image/x-icon" href="/static/dav_base/img/dav-favicon.ico" rel="shortcut icon" />',
|
||||
'<link type="image/x-icon" href="{static_url}dav_base/img/dav-favicon.ico" rel="shortcut icon" />',
|
||||
# bootstrap css
|
||||
'<link type="text/css" href="/static/dav_base/bootstrap/css/bootstrap.min.css" rel="stylesheet" />',
|
||||
'<link type="text/css" href="{static_url}dav_base/bootstrap/css/bootstrap.min.css" rel="stylesheet" />',
|
||||
# css file for jquery.dataTables.js
|
||||
'<link type="text/css" href="/static/dav_base/css/dataTables.bootstrap.min.css" rel="stylesheet" />',
|
||||
'<link type="text/css" href="{static_url}dav_base/css/dataTables.bootstrap.min.css" rel="stylesheet" />',
|
||||
# local css file
|
||||
'<link type="text/css" href="/static/dav_base/css/local.css" rel="stylesheet" />',
|
||||
'<link type="text/css" href="{static_url}dav_base/css/local.css" rel="stylesheet" />',
|
||||
# jquery.js file
|
||||
'<script type="text/javascript" src="/static/dav_base/js/jquery.min.js"></script>',
|
||||
'<script type="text/javascript" src="{static_url}dav_base/js/jquery.min.js"></script>',
|
||||
# jquery.dataTables.js file
|
||||
'<script type="text/javascript" src="/static/dav_base/js/jquery.dataTables.min.js"></script>',
|
||||
'<script type="text/javascript" src="{static_url}dav_base/js/jquery.dataTables.min.js"></script>',
|
||||
# bootstrap js file
|
||||
'<script type="text/javascript" src="/static/dav_base/bootstrap/js/bootstrap.min.js"></script>',
|
||||
'<script type="text/javascript" src="{static_url}dav_base/bootstrap/js/bootstrap.min.js"></script>',
|
||||
)
|
||||
|
||||
for needle in html_needles:
|
||||
needle = needle.format(static_url=static_url)
|
||||
self.assertInHTML(needle, response.content)
|
||||
|
||||
def test_page_footer(self):
|
||||
|
||||
Reference in New Issue
Block a user