@@ -8,23 +8,23 @@ def test_host_with_no_region(self):
8
8
9
9
def test_host_with_eu_region (self ):
10
10
sg = sendgrid .SendGridAPIClient (api_key = 'MY_API_KEY' )
11
- sg .set_region ("eu" )
11
+ sg .set_data_residency ("eu" )
12
12
self .assertEqual ("https://api.eu.sendgrid.com" ,sg .host )
13
13
14
14
def test_host_with_global_region (self ):
15
15
sg = sendgrid .SendGridAPIClient (api_key = 'MY_API_KEY' )
16
- sg .set_region ("global" )
16
+ sg .set_data_residency ("global" )
17
17
self .assertEqual ("https://api.sendgrid.com" ,sg .host )
18
18
19
19
def test_host_with_host_first_eu_region_second (self ):
20
20
sg = sendgrid .SendGridAPIClient (api_key = 'MY_API_KEY' )
21
21
sg .set_host ("https://sendgrid.com" )
22
- sg .set_region ("eu" )
22
+ sg .set_data_residency ("eu" )
23
23
self .assertEqual ("https://api.eu.sendgrid.com" ,sg .host )
24
24
25
25
def test_host_with_eu_first_host_second (self ):
26
26
sg = sendgrid .SendGridAPIClient (api_key = 'MY_API_KEY' )
27
- sg .set_region ("eu" )
27
+ sg .set_data_residency ("eu" )
28
28
sg .set_host ("https://sendgrid.com" )
29
29
self .assertEqual ("https://sendgrid.com" ,sg .host )
30
30
@@ -35,9 +35,9 @@ def test_host_using_constructor(self):
35
35
def test_with_region_is_none (self ):
36
36
sg = sendgrid .SendGridAPIClient (api_key = 'MY_API_KEY' )
37
37
with self .assertRaises (ValueError ):
38
- sg .set_region ( "" )
38
+ sg .set_data_residency ( None )
39
39
40
- def test_with_region_is_none (self ):
40
+ def test_with_region_is_invalid (self ):
41
41
sg = sendgrid .SendGridAPIClient (api_key = 'MY_API_KEY' )
42
42
with self .assertRaises (ValueError ):
43
- sg .set_region ("abc" )
43
+ sg .set_data_residency ("abc" )
0 commit comments