@@ -78,36 +78,6 @@ def test_periods_in_query(self):
7878 "https://api.edge.region.twilio.com/path/to/something.json?foo=12.34" ,
7979 )
8080
81- def test_edge_deprecation_warning_when_only_edge_is_set (self ):
82- with warnings .catch_warnings (record = True ) as w :
83- warnings .simplefilter ("always" ) # Ensure all warnings are caught
84- Client (
85- username = "username" , password = "password" , edge = "edge"
86- ) # Trigger the warning
87-
88- # Check if a warning was raised
89- self .assertGreater (len (w ), 0 )
90- self .assertTrue (issubclass (w [- 1 ].category , DeprecationWarning ))
91- self .assertIn (
92- "For regional processing, DNS is of format product.<edge>.<region>.twilio.com; otherwise use product.twilio.com." ,
93- str (w [- 1 ].message ),
94- )
95-
96- def test_edge_deprecation_warning_when_only_region_is_set (self ):
97- with warnings .catch_warnings (record = True ) as w :
98- warnings .simplefilter ("always" ) # Ensure all warnings are caught
99- Client (
100- username = "username" , password = "password" , region = "us1"
101- ) # Trigger the warning
102-
103- # Check if a warning was raised
104- self .assertGreater (len (w ), 0 )
105- self .assertTrue (issubclass (w [- 1 ].category , DeprecationWarning ))
106- self .assertIn (
107- "For regional processing, DNS is of format product.<edge>.<region>.twilio.com; otherwise use product.twilio.com." ,
108- str (w [- 1 ].message ),
109- )
110-
11181
11282class TestUserAgentClients (unittest .TestCase ):
11383 def setUp (self ):
0 commit comments