@@ -1448,6 +1448,7 @@ def test_organization_geo_settings_retrieve(self):
14481448 response = self .client .get (org2_url )
14491449 self .assertEqual (response .status_code , 200 )
14501450
1451+ @patch .object (config_app_settings , "WHOIS_CONFIGURED" , True )
14511452 def test_organization_geo_settings_update (self ):
14521453 org1 = self ._create_org (name = "Org 1" )
14531454 org2 = self ._create_org (name = "Org 2" )
@@ -1509,26 +1510,6 @@ def test_organization_geo_settings_update(self):
15091510 )
15101511 self .assertEqual (response .status_code , 404 )
15111512
1512- with self .subTest ("Validation error when WHOIS not configured" ):
1513- with patch .object (config_app_settings , "WHOIS_CONFIGURED" , False ):
1514- response = self .client .put (
1515- url ,
1516- {"estimated_location_enabled" : True },
1517- content_type = "application/json" ,
1518- )
1519- self .assertEqual (response .status_code , 400 )
1520- self .assertIn ("estimated_location_enabled" , response .data )
1521- org1_geo_settings .refresh_from_db ()
1522- self .assertEqual (org1_geo_settings .estimated_location_enabled , False )
1523-
1524- response = self .client .patch (
1525- url ,
1526- {"estimated_location_enabled" : True },
1527- content_type = "application/json" ,
1528- )
1529- self .assertEqual (response .status_code , 400 )
1530- self .assertIn ("estimated_location_enabled" , response .data )
1531-
15321513 with self .subTest ("Superuser can update any organization's geo settings" ):
15331514 superuser = self ._get_admin ()
15341515 self .client .force_login (user = superuser )
0 commit comments