Skip to content

Commit

Permalink
fix: call init for the tests
Browse files Browse the repository at this point in the history
* @blueprint.record_once was called on the tests but the entrypoints
  not, therefore the init function has to be called explicitly
  • Loading branch information
utnapischtim committed May 25, 2023
1 parent fdd5f72 commit 9089d94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from invenio_vocabularies.records.api import Vocabulary

from invenio_communities.communities.records.api import Community
from invenio_communities.ext import init
from invenio_communities.members.records.api import Member
from invenio_communities.proxies import current_communities

Expand Down Expand Up @@ -65,7 +66,13 @@ def app_config(app_config):
@pytest.fixture(scope="module")
def create_app(instance_path):
"""Application factory fixture."""
return create_api

def wrap(**config):
app = create_api(**config)
init(app)
return app

return wrap


@pytest.fixture()
Expand Down

0 comments on commit 9089d94

Please sign in to comment.