diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/activities/models/test_post.py | 4 | ||||
-rw-r--r-- | tests/conftest.py | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/activities/models/test_post.py b/tests/activities/models/test_post.py index a5f2f79..ff74a9e 100644 --- a/tests/activities/models/test_post.py +++ b/tests/activities/models/test_post.py @@ -100,7 +100,9 @@ def test_linkify_mentions_remote( @pytest.mark.django_db -def test_linkify_mentions_local(identity, identity2, remote_identity): +def test_linkify_mentions_local( + config_system, emoji_locals, identity, identity2, remote_identity +): """ Tests that we can linkify post mentions properly for local use """ diff --git a/tests/conftest.py b/tests/conftest.py index f2b9d64..4466130 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,7 @@ import time import pytest +from activities.models import Emoji from api.models import Application, Token from core.models import Config from stator.runner import StatorModel, StatorRunner @@ -69,6 +70,16 @@ def config_system(keypair): @pytest.fixture @pytest.mark.django_db +def emoji_locals(): + Emoji.locals = Emoji.load_locals() + Emoji.__forced__ = True + yield Emoji.locals + Emoji.__forced__ = False + del Emoji.locals + + +@pytest.fixture +@pytest.mark.django_db def user() -> User: return User.objects.create(email="test@example.com") |