Skip to content

Commit 289c8a2

Browse files
committed
1 parent e1c6600 commit 289c8a2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ckanext/pages/tests/fixtures.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77

88
@pytest.fixture
9-
def pages_setup():
10-
if db.pages_table is None:
11-
db.init_db()
9+
def clean_db(reset_db, migrate_db_for):
10+
reset_db()
11+
migrate_db_for("pages")
1212

1313

1414
@pytest.fixture

ckanext/pages/tests/test_action.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from ckan.tests import factories, helpers
44

55

6-
@pytest.mark.usefixtures("clean_db", "pages_setup")
6+
@pytest.mark.usefixtures("with_plugins", "clean_db")
7+
@pytest.mark.ckan_config("ckan.plugins", "pages")
78
class TestPagesActions:
89
def test_pages_create_action(self, app):
910
user = factories.User()

ckanext/pages/tests/test_logic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
ckan_29_or_higher = toolkit.check_ckan_version(u'2.9')
1515

1616

17-
@pytest.mark.usefixtures("clean_db", "pages_setup")
17+
@pytest.mark.usefixtures("with_plugins", "clean_db")
18+
@pytest.mark.ckan_config("ckan.plugins", "pages")
1819
class TestPages():
1920

2021
def test_create_page(self, app):

0 commit comments

Comments
 (0)