@@ -123,24 +123,6 @@ def test_subproject_redirect(self):
123
123
resp ["X-RTD-Redirect" ], RedirectType .subproject_to_main_domain .name
124
124
)
125
125
126
- # We are not canonicalizing custom domains -> public domain for now
127
- @pytest .mark .xfail (strict = True )
128
- def test_canonical_cname_redirect_public_domain (self ):
129
- """Requests to a custom domain should redirect to the public domain or canonical domain if not canonical."""
130
- cname = 'docs.random.com'
131
- domain = get (Domain , project = self .pip , domain = cname , canonical = False , https = False )
132
-
133
- resp = self .client .get (self .url , HTTP_HOST = cname )
134
- self .assertEqual (resp .status_code , 302 )
135
- self .assertEqual (resp ["X-RTD-Redirect" ], "noncanonical-cname" )
136
-
137
- # Make the domain canonical and make sure we don't redirect
138
- domain .canonical = True
139
- domain .save ()
140
- for url in (self .url , '/subdir/' ):
141
- resp = self .client .get (url , HTTP_HOST = cname )
142
- self .assertNotIn ("X-RTD-Redirect" , resp )
143
-
144
126
def test_proper_cname_uppercase (self ):
145
127
get (Domain , project = self .pip , domain = 'docs.random.com' )
146
128
request = self .request (method = 'get' , path = self .url , HTTP_HOST = 'docs.RANDOM.COM' )
0 commit comments