From af3142ac3adb0d1f31d160edcb6d076b293020b1 Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Thu, 15 Dec 2022 02:50:54 -0500 Subject: Basic Emoji suppport (#157) --- tests/activities/models/test_post.py | 4 +++- tests/conftest.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'tests') 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 @@ -67,6 +68,16 @@ def config_system(keypair): del Config.system +@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: -- cgit v1.2.3