@@ -18,14 +18,11 @@ def test_create_request(self):
1818 self .holodeck .mock (Response (500 , '' ))
1919
2020 with self .assertRaises (TwilioException ):
21- self .client .supersim .v1 .esim_profiles .create (eid = "eid" )
22-
23- values = {'Eid' : "eid" , }
21+ self .client .supersim .v1 .esim_profiles .create ()
2422
2523 self .holodeck .assert_has_request (Request (
2624 'post' ,
2725 'https://supersim.twilio.com/v1/ESimProfiles' ,
28- data = values ,
2926 ))
3027
3128 def test_create_default_smdp_response (self ):
@@ -37,9 +34,38 @@ def test_create_default_smdp_response(self):
3734 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3835 "iccid": null,
3936 "sim_sid": null,
40- "status": "reserving ",
37+ "status": "new ",
4138 "eid": "89049032005008882600033489aaaaaa",
4239 "smdp_plus_address": null,
40+ "matching_id": null,
41+ "activation_code": null,
42+ "error_code": null,
43+ "error_message": null,
44+ "date_created": "2020-09-01T20:00:00Z",
45+ "date_updated": "2020-09-01T20:00:00Z",
46+ "url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
47+ }
48+ '''
49+ ))
50+
51+ actual = self .client .supersim .v1 .esim_profiles .create ()
52+
53+ self .assertIsNotNone (actual )
54+
55+ def test_create_activation_code_response (self ):
56+ self .holodeck .mock (Response (
57+ 201 ,
58+ '''
59+ {
60+ "sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
62+ "iccid": null,
63+ "sim_sid": null,
64+ "status": "new",
65+ "eid": null,
66+ "smdp_plus_address": null,
67+ "matching_id": null,
68+ "activation_code": null,
4369 "error_code": null,
4470 "error_message": null,
4571 "date_created": "2020-09-01T20:00:00Z",
@@ -49,7 +75,7 @@ def test_create_default_smdp_response(self):
4975 '''
5076 ))
5177
52- actual = self .client .supersim .v1 .esim_profiles .create (eid = "eid" )
78+ actual = self .client .supersim .v1 .esim_profiles .create ()
5379
5480 self .assertIsNotNone (actual )
5581
@@ -65,6 +91,8 @@ def test_create_with_callback_response(self):
6591 "status": "reserving",
6692 "eid": "89049032005008882600033489aaaaaa",
6793 "smdp_plus_address": null,
94+ "matching_id": null,
95+ "activation_code": null,
6896 "error_code": null,
6997 "error_message": null,
7098 "date_created": "2020-09-01T20:00:00Z",
@@ -74,7 +102,7 @@ def test_create_with_callback_response(self):
74102 '''
75103 ))
76104
77- actual = self .client .supersim .v1 .esim_profiles .create (eid = "eid" )
105+ actual = self .client .supersim .v1 .esim_profiles .create ()
78106
79107 self .assertIsNotNone (actual )
80108
@@ -89,7 +117,7 @@ def test_fetch_request(self):
89117 'https://supersim.twilio.com/v1/ESimProfiles/HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ,
90118 ))
91119
92- def test_fetch_response (self ):
120+ def test_fetch_default_smdp_response (self ):
93121 self .holodeck .mock (Response (
94122 200 ,
95123 '''
@@ -100,7 +128,36 @@ def test_fetch_response(self):
100128 "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101129 "status": "available",
102130 "eid": "89049032005008882600033489aaaaaa",
103- "smdp_plus_address": "https://sm-dp-plus.twilio.com",
131+ "smdp_plus_address": "sm-dp-plus.twilio.com",
132+ "matching_id": null,
133+ "activation_code": null,
134+ "error_code": null,
135+ "error_message": null,
136+ "date_created": "2020-09-01T20:00:00Z",
137+ "date_updated": "2020-09-01T20:00:00Z",
138+ "url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
139+ }
140+ '''
141+ ))
142+
143+ actual = self .client .supersim .v1 .esim_profiles ("HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" ).fetch ()
144+
145+ self .assertIsNotNone (actual )
146+
147+ def test_fetch_activation_code_response (self ):
148+ self .holodeck .mock (Response (
149+ 200 ,
150+ '''
151+ {
152+ "sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
153+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
154+ "iccid": "8988307aaaaaaaaaaaaa",
155+ "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
156+ "status": "available",
157+ "eid": null,
158+ "smdp_plus_address": "sm-dp-plus.twilio.com",
159+ "matching_id": "AAAAA-BBBBB-CCCCC-DDDDD-EEEEE",
160+ "activation_code": "1$SM-DP-PLUS.TWILIO.COM$AAAAA-BBBBB-CCCCC-DDDDD-EEEEE",
104161 "error_code": null,
105162 "error_message": null,
106163 "date_created": "2020-09-01T20:00:00Z",
@@ -138,7 +195,9 @@ def test_read_all_response(self):
138195 "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
139196 "status": "available",
140197 "eid": "89049032005008882600033489aaaaaa",
141- "smdp_plus_address": "https://sm-dp-plus.twilio.com",
198+ "smdp_plus_address": "sm-dp-plus.twilio.com",
199+ "matching_id": null,
200+ "activation_code": null,
142201 "error_code": null,
143202 "error_message": null,
144203 "date_created": "2020-09-01T20:00:00Z",
@@ -176,7 +235,9 @@ def test_read_by_eid_response(self):
176235 "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177236 "status": "available",
178237 "eid": "89049032005008882600033489aaaaaa",
179- "smdp_plus_address": "https://sm-dp-plus.twilio.com",
238+ "smdp_plus_address": "sm-dp-plus.twilio.com",
239+ "matching_id": null,
240+ "activation_code": null,
180241 "error_code": null,
181242 "error_message": null,
182243 "date_created": "2020-09-01T20:00:00Z",
@@ -214,7 +275,9 @@ def test_read_by_sim_sid_response(self):
214275 "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
215276 "status": "available",
216277 "eid": "89049032005008882600033489aaaaaa",
217- "smdp_plus_address": "https://sm-dp-plus.twilio.com",
278+ "smdp_plus_address": "sm-dp-plus.twilio.com",
279+ "matching_id": null,
280+ "activation_code": null,
218281 "error_code": null,
219282 "error_message": null,
220283 "date_created": "2020-09-01T20:00:00Z",
@@ -252,7 +315,9 @@ def test_read_by_status_response(self):
252315 "sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
253316 "status": "downloaded",
254317 "eid": "89049032005008882600033489aaaaaa",
255- "smdp_plus_address": "https://sm-dp-plus.twilio.com",
318+ "smdp_plus_address": "sm-dp-plus.twilio.com",
319+ "matching_id": null,
320+ "activation_code": null,
256321 "error_code": null,
257322 "error_message": null,
258323 "date_created": "2020-09-01T20:00:00Z",
0 commit comments