From 97c8b91ec7d16a13238c9c27a44546e736c9fc7f Mon Sep 17 00:00:00 2001 From: John Glover Date: Tue, 29 Nov 2011 13:32:03 +0000 Subject: [PATCH] update test_analytics_snippet test for latest CKAN master changes (setting map.explicit to true) --- tests/test_general.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/test_general.py b/tests/test_general.py index 0e2f662..6652f15 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -44,14 +44,10 @@ class TestLoadCommand(TestCase): def setup_class(cls): config = appconfig('config:test.ini', relative_to=conf_dir) config.local_conf['ckan.plugins'] = 'googleanalytics' - config.local_conf['googleanalytics.username'] \ - = 'borf' - config.local_conf['googleanalytics.password'] \ - = 'borf' - config.local_conf['googleanalytics.id'] \ - = 'UA-borf-1' - config.local_conf['googleanalytics.show_downloads'] \ - = 'true' + config.local_conf['googleanalytics.username'] = 'borf' + config.local_conf['googleanalytics.password'] = 'borf' + config.local_conf['googleanalytics.id'] = 'UA-borf-1' + config.local_conf['googleanalytics.show_downloads'] = 'true' cls.config = config.local_conf wsgiapp = make_app(config.global_conf, **config.local_conf) env = {'HTTP_ACCEPT': ('text/html;q=0.9,text/plain;' @@ -68,9 +64,8 @@ class TestLoadCommand(TestCase): conn.getresponse() def test_analytics_snippet(self): - response = self.app.get(url_for(controller='tag')) - code = gacode % (self.config['googleanalytics.id'], - 'auto') + response = self.app.get(url_for(controller='tag', action='index')) + code = gacode % (self.config['googleanalytics.id'], 'auto') assert code in response.body def test_top_packages(self):