From c0219bd11fec34ec6d994809625d669a67a37b40 Mon Sep 17 00:00:00 2001 From: Thibault Coudray <169165300+tcoudray-pass@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:25:22 +0100 Subject: [PATCH] (PC-33516)[API] feat: remove `APIProviderFactory` --- api/src/pcapi/core/providers/factories.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/api/src/pcapi/core/providers/factories.py b/api/src/pcapi/core/providers/factories.py index fde0642d9a8..8044c50b834 100644 --- a/api/src/pcapi/core/providers/factories.py +++ b/api/src/pcapi/core/providers/factories.py @@ -49,18 +49,6 @@ class Meta: isActive = True -class APIProviderFactory(BaseFactory): - # This factory creates legacy providers. - # The API they uses will be dropped, do not use this factory unless you specifically want to. - class Meta: - model = models.Provider - - name = factory.Sequence("API Provider {}".format) - apiUrl = factory.Sequence("https://{}.example.org/stocks".format) - enabledForPro = True - isActive = True - - class PublicApiProviderFactory(BaseFactory): class Meta: model = models.Provider @@ -80,9 +68,8 @@ class Meta: model = models.VenueProvider venue = factory.SubFactory(offerers_factories.VenueFactory) - provider = factory.SubFactory(APIProviderFactory) + provider = factory.SubFactory(PublicApiProviderFactory) isActive = True - venueIdAtOfferProvider = factory.SelfAttribute("venue.siret")