Fix tests for ckan 2.2 again with amercaders suggestion.

This commit is contained in:
David Read 2015-12-11 11:53:51 +00:00
parent 77f98d5b18
commit d08f72ad13
1 changed files with 7 additions and 2 deletions

View File

@ -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