Merge pull request #218 from metaodi/217-run-test-ckan23

Swap import statements to make sure `run_test` works on CKAN 2.3
This commit is contained in:
David Read 2016-01-12 09:17:24 +00:00
commit aaa7dc9e4d
2 changed files with 6 additions and 4 deletions

View File

@ -1,9 +1,9 @@
import factory
import ckanext.harvest.model as harvest_model
try:
from ckan.tests.factories import _get_action_user_name
except ImportError:
from ckan.new_tests.factories import _get_action_user_name
except ImportError:
from ckan.tests.factories import _get_action_user_name
from ckan.plugins import toolkit

View File

@ -7,9 +7,11 @@ from ckan.model import Package, Session
from ckan.lib.helpers import url_for,json
from ckan.lib.base import config
from ckan.tests import CreateTestData
#TODO: remove references to old tests
try:
from ckan.tests import CreateTestData
except ImportError:
from ckan.tests.legacy import CreateTestData
try:
from ckan.tests.functional.base import FunctionalTestCase
except ImportError: