@@ -485,7 +485,7 @@ def test_refresh_scopes(self):
485485 _session_info ["session_id" ], _resp ["response_args" ]["refresh_token" ]
486486 )
487487
488- assert at .scope == rt .scope == _request ["scope" ]
488+ assert at .scope == rt .scope == _request ["scope" ] == _resp [ "response_args" ][ "scope" ]
489489
490490 def test_refresh_more_scopes (self ):
491491 areq = AUTH_REQ .copy ()
@@ -590,7 +590,7 @@ def test_refresh_more_scopes_2(self):
590590 _session_info ["session_id" ], _resp ["response_args" ]["refresh_token" ]
591591 )
592592
593- assert at .scope == rt .scope == _request ["scope" ]
593+ assert at .scope == rt .scope == _request ["scope" ] == _resp [ "response_args" ][ "scope" ]
594594
595595 def test_refresh_less_scopes (self ):
596596 areq = AUTH_REQ .copy ()
@@ -635,6 +635,7 @@ def test_refresh_less_scopes(self):
635635 )
636636
637637 assert "email" not in idtoken
638+ assert _resp ["response_args" ]["scope" ] == ["openid" , "offline_access" ]
638639
639640 def test_refresh_no_openid_scope (self ):
640641 areq = AUTH_REQ .copy ()
@@ -673,6 +674,7 @@ def test_refresh_no_openid_scope(self):
673674 "refresh_token" ,
674675 "scope" ,
675676 }
677+ assert _resp ["response_args" ]["scope" ] == ["offline_access" ]
676678
677679 def test_refresh_no_offline_access_scope (self ):
678680 areq = AUTH_REQ .copy ()
@@ -716,6 +718,7 @@ def test_refresh_no_offline_access_scope(self):
716718 self .endpoint_context .keyjar ,
717719 sender = "" ,
718720 )
721+ assert _resp ["response_args" ]["scope" ] == ["openid" ]
719722
720723 def test_new_refresh_token (self , conf ):
721724 self .endpoint_context .cdb ["client_1" ] = {
0 commit comments