Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC provider ActiveState #13980

Closed
wants to merge 11 commits into from
Closed
28 changes: 28 additions & 0 deletions tests/common/db/oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
import factory

from warehouse.oidc.models import (
ActiveStatePublisher,
GitHubPublisher,
GooglePublisher,
PendingActiveStatePublisher,
PendingGitHubPublisher,
PendingGooglePublisher,
)
Expand Down Expand Up @@ -67,3 +69,29 @@ class Meta:
email = factory.Faker("safe_email")
sub = factory.Faker("pystr", max_chars=12)
added_by = factory.SubFactory(UserFactory)


class ActiveStatePublisherFactory(WarehouseFactory):
class Meta:
model = ActiveStatePublisher

id = factory.Faker("uuid4", cast_to=None)
organization = factory.Faker("pystr", max_chars=12)
activestate_project_name = factory.Faker("pystr", max_chars=12)
actor = factory.Faker("pystr", max_chars=12)
actor_id = factory.Faker("uuid4")
ingredient = factory.Faker("pystr", max_chars=12)


class PendingActiveStatePublisherFactory(WarehouseFactory):
class Meta:
model = PendingActiveStatePublisher

id = factory.Faker("uuid4", cast_to=None)
project_name = factory.Faker("pystr", max_chars=12)
organization = factory.Faker("pystr", max_chars=12)
activestate_project_name = factory.Faker("pystr", max_chars=12)
actor = factory.Faker("pystr", max_chars=12)
actor_id = factory.Faker("uuid4")
added_by = factory.SubFactory(UserFactory)
ingredient = factory.Faker("pystr", max_chars=12)
Loading