Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jul 12, 2024
1 parent e1c6600 commit 289c8a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ckanext/pages/tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@


@pytest.fixture
def pages_setup():
if db.pages_table is None:
db.init_db()
def clean_db(reset_db, migrate_db_for):
reset_db()
migrate_db_for("pages")


@pytest.fixture
Expand Down
3 changes: 2 additions & 1 deletion ckanext/pages/tests/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from ckan.tests import factories, helpers


@pytest.mark.usefixtures("clean_db", "pages_setup")
@pytest.mark.usefixtures("with_plugins", "clean_db")
@pytest.mark.ckan_config("ckan.plugins", "pages")
class TestPagesActions:
def test_pages_create_action(self, app):
user = factories.User()
Expand Down
3 changes: 2 additions & 1 deletion ckanext/pages/tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
ckan_29_or_higher = toolkit.check_ckan_version(u'2.9')


@pytest.mark.usefixtures("clean_db", "pages_setup")
@pytest.mark.usefixtures("with_plugins", "clean_db")
@pytest.mark.ckan_config("ckan.plugins", "pages")
class TestPages():

def test_create_page(self, app):
Expand Down

0 comments on commit 289c8a2

Please sign in to comment.