Skip to content

Commit

Permalink
(PC-33516)[API] feat: remove APIProviderFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoudray-pass committed Jan 10, 2025
1 parent fd6350a commit c0219bd
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions api/src/pcapi/core/providers/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")


Expand Down

0 comments on commit c0219bd

Please sign in to comment.