File tree 1 file changed +26
-0
lines changed
readthedocs/domains/tests
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 7
7
from django_dynamic_fixture import get
8
8
9
9
from readthedocs .domains .tasks import email_pending_custom_domains
10
+ from readthedocs .organizations .models import Organization , Team
10
11
from readthedocs .projects .constants import (
11
12
SSL_STATUS_INVALID ,
12
13
SSL_STATUS_PENDING ,
@@ -119,3 +120,28 @@ def test_send_email_on_given_days(self, send_email):
119
120
kwargs = send_email .call_args_list [2 ][1 ]
120
121
self .assertEqual (kwargs ["recipient" ], self .another_user .email )
121
122
self .assertIn (self .domain_invalid .domain , kwargs ["context" ]["content" ])
123
+
124
+
125
+ @override_settings (RTD_ALLOW_ORGANIZATIONS = True )
126
+ class TestTasksWithOrganizations (TestTasks ):
127
+ def setUp (self ):
128
+ super ().setUp ()
129
+ self .organization = get (
130
+ Organization ,
131
+ owners = [self .user ],
132
+ projects = [self .project , self .another_project ],
133
+ )
134
+ self .team_a = get (
135
+ Team ,
136
+ organization = self .organization ,
137
+ members = [self .user ],
138
+ projects = [self .project , self .another_project ],
139
+ access = "admin" ,
140
+ )
141
+ self .team_b = get (
142
+ Team ,
143
+ organization = self .organization ,
144
+ members = [self .user , self .another_user ],
145
+ projects = [self .another_project ],
146
+ access = "admin" ,
147
+ )
You can’t perform that action at this time.
0 commit comments