Skip to content

Commit

Permalink
[#1753] Add backward compatibility for tests and warning. Tested agai…
Browse files Browse the repository at this point in the history
…nst ckanext-harvest/spatial/archiver/qa.
  • Loading branch information
David Read committed Jan 15, 2015
1 parent 529c2bb commit 01826e7
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ckan/tests/__init__.py
@@ -0,0 +1,9 @@
import warnings

warnings.warn(
"ckan.tests has been renamed to ckan.tests_legacy. "
"In the next release it is planned to remove ckan.tests, and possibly "
"rename ckan.new_tests to ckan.tests.",
FutureWarning)

from ckan.tests_legacy import *
10 changes: 10 additions & 0 deletions ckan/tests/functional/__init__.py
@@ -0,0 +1,10 @@
import warnings

warnings.warn(
"ckan.tests has been renamed to ckan.tests_legacy. "
"In the next release it is planned to remove ckan.tests, and possibly "
"rename ckan.new_tests to ckan.tests.",
FutureWarning)

from ckan.tests_legacy.functional import *

11 changes: 11 additions & 0 deletions ckan/tests/functional/api/base.py
@@ -0,0 +1,11 @@
import warnings

warnings.warn(
"ckan.tests has been renamed to ckan.tests_legacy. "
"In the next release it is planned to remove ckan.tests, and possibly "
"rename ckan.new_tests to ckan.tests.",
FutureWarning)

from ckan.tests_legacy.functional.api.base import *


9 changes: 9 additions & 0 deletions ckan/tests/functional/base.py
@@ -0,0 +1,9 @@
import warnings

warnings.warn(
"ckan.tests has been renamed to ckan.tests_legacy. "
"In the next release it is planned to remove ckan.tests, and possibly "
"rename ckan.new_tests to ckan.tests.",
FutureWarning)

from ckan.tests_legacy.functional.base import *
4 changes: 4 additions & 0 deletions ckan/tests_legacy/__init__.py
Expand Up @@ -46,6 +46,10 @@
'TestCase',
'SkipTest',
'CkanServerCase',
'call_action_api',
'BaseCase',
'here_dir',
'conf_dir',
]

here_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down

0 comments on commit 01826e7

Please sign in to comment.