|
15 | 15 | from warehouse.oidc.models import (
|
16 | 16 | ActiveStatePublisher,
|
17 | 17 | GitHubPublisher,
|
| 18 | + GitLabPublisher, |
18 | 19 | GooglePublisher,
|
19 | 20 | PendingActiveStatePublisher,
|
20 | 21 | PendingGitHubPublisher,
|
| 22 | + PendingGitLabPublisher, |
21 | 23 | PendingGooglePublisher,
|
22 | 24 | )
|
23 | 25 |
|
@@ -51,6 +53,30 @@ class Meta:
|
51 | 53 | added_by = factory.SubFactory(UserFactory)
|
52 | 54 |
|
53 | 55 |
|
| 56 | +class GitLabPublisherFactory(WarehouseFactory): |
| 57 | + class Meta: |
| 58 | + model = GitLabPublisher |
| 59 | + |
| 60 | + id = factory.Faker("uuid4", cast_to=None) |
| 61 | + project = factory.Faker("pystr", max_chars=12) |
| 62 | + namespace = factory.Faker("pystr", max_chars=12) |
| 63 | + workflow_filepath = "subfolder/example.yml" |
| 64 | + environment = "production" |
| 65 | + |
| 66 | + |
| 67 | +class PendingGitLabPublisherFactory(WarehouseFactory): |
| 68 | + class Meta: |
| 69 | + model = PendingGitLabPublisher |
| 70 | + |
| 71 | + id = factory.Faker("uuid4", cast_to=None) |
| 72 | + project_name = "fake-nonexistent-project" |
| 73 | + project = factory.Faker("pystr", max_chars=12) |
| 74 | + namespace = factory.Faker("pystr", max_chars=12) |
| 75 | + workflow_filepath = "subfolder/example.yml" |
| 76 | + environment = "production" |
| 77 | + added_by = factory.SubFactory(UserFactory) |
| 78 | + |
| 79 | + |
54 | 80 | class GooglePublisherFactory(WarehouseFactory):
|
55 | 81 | class Meta:
|
56 | 82 | model = GooglePublisher
|
|
0 commit comments