Skip to content

Commit ab41ff1

Browse files
authored
Add organization to upload API tests to support business tests (#13269)
This is required to test against organization permissions.
1 parent b2694eb commit ab41ff1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

readthedocs/upload/tests/test_views.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from readthedocs.doc_builder.exceptions import BuildMaxConcurrencyError
2424
from readthedocs.doc_builder.exceptions import BuildUserError
2525
from readthedocs.notifications.models import Notification
26+
from readthedocs.organizations.models import Organization
2627
from readthedocs.projects.constants import PRIVATE
2728
from readthedocs.projects.constants import PUBLIC
2829
from readthedocs.projects.models import Feature
@@ -43,6 +44,11 @@ def setUp(self):
4344
slug="project",
4445
users=[self.user],
4546
)
47+
self.organization = get(
48+
Organization,
49+
owners=[self.user],
50+
projects=[self.project],
51+
)
4652
self.feature = get(
4753
Feature,
4854
feature_id=Feature.ALLOW_DIRECT_ARTIFACTS_UPLOAD,

0 commit comments

Comments
 (0)