@@ -401,7 +401,10 @@ def tearDownClass(cls):
401
401
def get_lab_app_object (cls , ** query ): # https://msidlab.com/swagger/index.html
402
402
url = "https://msidlab.com/api/app"
403
403
resp = cls .session .get (url , params = query )
404
- return resp .json ()[0 ]
404
+ result = resp .json ()[0 ]
405
+ result ["scopes" ] = [ # Raw data has extra space, such as "s1, s2"
406
+ s .strip () for s in result ["defaultScopes" ].split (',' )]
407
+ return result
405
408
406
409
@classmethod
407
410
def get_lab_user_secret (cls , lab_name = "msidlab4" ):
@@ -698,7 +701,7 @@ def test_b2c_acquire_token_by_auth_code(self):
698
701
authority = self ._build_b2c_authority ("B2C_1_SignInPolicy" ),
699
702
client_id = config ["appId" ],
700
703
port = 3843 , # Lab defines 4 of them: [3843, 4584, 4843, 60000]
701
- scope = config ["defaultScopes" ]. split ( ',' ) ,
704
+ scope = config ["scopes" ] ,
702
705
)
703
706
704
707
@unittest .skipIf (os .getenv ("TRAVIS" ), "Browser automation is not yet implemented" )
@@ -708,7 +711,7 @@ def test_b2c_acquire_token_by_auth_code_flow(self):
708
711
authority = self ._build_b2c_authority ("B2C_1_SignInPolicy" ),
709
712
client_id = config ["appId" ],
710
713
port = 3843 , # Lab defines 4 of them: [3843, 4584, 4843, 60000]
711
- scope = config ["defaultScopes" ]. split ( ',' ) ,
714
+ scope = config ["scopes" ] ,
712
715
username_uri = "https://msidlab.com/api/user?usertype=b2c&b2cprovider=local" ,
713
716
)
714
717
@@ -719,7 +722,7 @@ def test_b2c_acquire_token_by_ropc(self):
719
722
client_id = config ["appId" ],
720
723
721
724
password = self .get_lab_user_secret ("msidlabb2c" ),
722
- scope = config ["defaultScopes" ]. split ( ',' ) ,
725
+ scope = config ["scopes" ] ,
723
726
)
724
727
725
728
0 commit comments