From d08f72ad13cbfa90e11f6d7c2a176546feb78c1d Mon Sep 17 00:00:00 2001 From: David Read Date: Fri, 11 Dec 2015 11:53:51 +0000 Subject: [PATCH] Fix tests for ckan 2.2 again with amercaders suggestion. --- ckanext/harvest/tests/test_action.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ckanext/harvest/tests/test_action.py b/ckanext/harvest/tests/test_action.py index a6a46b2..e924611 100644 --- a/ckanext/harvest/tests/test_action.py +++ b/ckanext/harvest/tests/test_action.py @@ -15,8 +15,13 @@ except ImportError: try: from ckan.new_tests.helpers import assert_in except ImportError: - # ckan 2.2 only has it in the legacy test helpers - from ckan.tests.helpers import assert_in + # for ckan 2.2 + try: + from nose.tools import assert_in + except ImportError: + # Python 2.6 doesn't have it + def assert_in(a, b, msg=None): + assert a in b, msg or '%r was not in %r' % (a, b) from ckan import plugins as p from ckan.plugins import toolkit