From 26c1679e80c9d5838a59bc7ae7e0a635021e98a7 Mon Sep 17 00:00:00 2001 From: Dan Jacob Date: Thu, 14 Nov 2024 12:22:43 +0200 Subject: [PATCH] fix: workaround for broken faker fixture : https://github.com/joke2k/faker/issues/2137 --- radiofeed/tests/fixtures.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/radiofeed/tests/fixtures.py b/radiofeed/tests/fixtures.py index 6c2bec6e2..833c834e3 100644 --- a/radiofeed/tests/fixtures.py +++ b/radiofeed/tests/fixtures.py @@ -6,6 +6,7 @@ from django.contrib.sites.models import Site from django.core.cache import cache from django.http import HttpRequest, HttpResponse +from faker import Faker @pytest.fixture @@ -13,6 +14,11 @@ def site(): return Site.objects.get_current() +@pytest.fixture +def faker(): + return Faker() + + @pytest.fixture(autouse=True) def _settings_overrides(settings: Settings) -> None: """Default settings for all tests."""