Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test case for none root fanstatic
- Loading branch information
Showing
1 changed file
with
19 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,19 @@ | ||
# encoding: utf-8 | ||
|
||
from ckan.common import config | ||
import ckan.plugins as p | ||
import ckan.config.middleware as middleware | ||
import webtest | ||
import ckan.tests.helpers as helpers | ||
|
||
|
||
class TestNoneRootCKAN(): | ||
@helpers.change_config(u'ckan.root_path', u'/data/{{LANG}}') | ||
def test_resource_url(self): | ||
wsgiapp = middleware.make_app(config[u'global_conf'], **config) | ||
app = webtest.TestApp(wsgiapp) | ||
p.load(u'example_theme_v15_fanstatic') | ||
content = app.get(u'/en/base.html') | ||
assert u'example_theme.css' in content | ||
assert u'href="/data/fanstatic/example_theme' in content | ||
p.unload(u'example_theme_v15_fanstatic') |