@@ -60,7 +60,7 @@ def test_compose_body(self):
6060 },
6161 )
6262
63- lo = LoginOptions (stepup = True , custom_claims = {"k1" : "v1" })
63+ lo = LoginOptions (stepup = True , custom_claims = {"k1" : "v1" }, template_id = "foo" )
6464 self .assertEqual (
6565 MagicLink ._compose_signin_body ("id1" , "uri1" , lo ),
6666 {
@@ -70,6 +70,7 @@ def test_compose_body(self):
7070 "stepup" : True ,
7171 "mfa" : False ,
7272 "customClaims" : {"k1" : "v1" },
73+ "templateId" : "foo" ,
7374 },
7475 },
7576 )
@@ -193,7 +194,9 @@ def test_sign_in(self):
193194 DeliveryMethod .EMAIL ,
194195195196 "http://test.me" ,
196- LoginOptions (stepup = True , template_options = {"blue" : "bla" }),
197+ LoginOptions (
198+ stepup = True , template_options = {"blue" : "bla" }, template_id = None
199+ ),
197200 refresh_token = refresh_token ,
198201 )
199202 mock_post .assert_called_with (
@@ -274,7 +277,7 @@ def test_sign_up(self):
274277275278 "http://test.me" ,
276279 signup_user_details ,
277- SignUpOptions (template_options = {"bla" : "blue" }),
280+ SignUpOptions (template_options = {"bla" : "blue" }, template_id = "foo" ),
278281 )
279282 self .assertEqual ("t***@example.com" , resp )
280283
@@ -294,7 +297,10 @@ def test_sign_up(self):
294297295298 },
296299297- "loginOptions" : {"templateOptions" : {"bla" : "blue" }},
300+ "loginOptions" : {
301+ "templateOptions" : {"bla" : "blue" },
302+ "templateId" : "foo" ,
303+ },
298304 },
299305 allow_redirects = False ,
300306 verify = True ,
@@ -420,7 +426,7 @@ def test_sign_up_or_in(self):
420426 DeliveryMethod .EMAIL ,
421427422428 "http://test.me" ,
423- SignUpOptions (template_options = {"bla" : "blue" }),
429+ SignUpOptions (template_options = {"bla" : "blue" }, template_id = "foo" ),
424430 ),
425431 )
426432 mock_post .assert_called_with (
@@ -437,6 +443,7 @@ def test_sign_up_or_in(self):
437443 "customClaims" : None ,
438444 "mfa" : False ,
439445 "templateOptions" : {"bla" : "blue" },
446+ "templateId" : "foo" ,
440447 },
441448 },
442449 allow_redirects = False ,
0 commit comments