File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
testv2/testv2_expected_behavior Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,20 @@ def run_async(coro):
1111 return asyncio .run (coro )
1212
1313class TestExpectedLogin (unittest .TestCase ):
14- def setUp (self ):
14+ @patch ('requests.get' )
15+ def setUp (self , mock_get ):
1516 """Set up test fixtures."""
17+ # Mock the OpenID configuration response
18+ mock_response = MagicMock ()
19+ mock_response .status_code = 200
20+ mock_response .json .return_value = {
21+ "authorization_endpoint" : "https://example.com/oauth2/auth" ,
22+ "token_endpoint" : "https://example.com/oauth2/token" ,
23+ "end_session_endpoint" : "https://example.com/logout" ,
24+ "userinfo_endpoint" : "https://example.com/oauth2/userinfo"
25+ }
26+ mock_get .return_value = mock_response
27+
1628 self .oauth = OAuth (
1729 client_id = "test_client_id" ,
1830 client_secret = "test_client_secret" ,
You can’t perform that action at this time.
0 commit comments