Skip to content

Commit

Permalink
[#2578] Fix related tests for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 30, 2012
1 parent 672264c commit 050020e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/config/environment.py
Expand Up @@ -191,6 +191,9 @@ def find_controller(self, controller):
legacy_templates_path = os.path.join(root, 'templates_legacy')
if asbool(config.get('ckan.legacy_templates', 'no')):
template_paths = [legacy_templates_path]
# if we are testing allow new templates
if asbool(config.get('ckan.enable_testing', 'false')):
template_paths = [paths['templates'][0]]
else:
template_paths = [paths['templates'][0]]
template_paths.append(legacy_templates_path)
Expand Down
1 change: 1 addition & 0 deletions ckan/tests/functional/test_related.py
Expand Up @@ -43,6 +43,7 @@ def test_related_new_missing(self):
def test_related_new_fail(self):
offset = h.url_for(controller='related',
action='new', id='warandpeace')
print '@@@@', offset
res = self.app.get(offset, status=200,
extra_environ={"REMOTE_USER": "testsysadmin"})
assert 'URL' in res, "URL missing in response text"
Expand Down
4 changes: 4 additions & 0 deletions test-core.ini
Expand Up @@ -35,6 +35,10 @@ ckan.extra_resource_fields = alt_url

# disable this so we can test all types of indexing
ckan.restrict_template_vars = false
# we need legacy templates for many tests to pass
ckan.legacy_templates = yes
# FIXME this is to allow some tests to pass but should be removed when possible
ckan.enable_testing = true

# Add additional test specific configuration options as necessary.
auth.blacklist = 83.222.23.234
Expand Down

0 comments on commit 050020e

Please sign in to comment.