async def auth_mgr(event_loop): session = ClientSession(loop=event_loop) mgr = AuthenticationManager(session, "abc", "123", "http://localhost") mgr.oauth = OAuth2TokenResponse.parse_raw(get_response("auth_oauth2_token")) mgr.user_token = XAUResponse.parse_raw(get_response("auth_user_token")) mgr.xsts_token = XSTSResponse.parse_raw(get_response("auth_xsts_token")) yield mgr await session.close()
async def auth_mgr(event_loop): mgr = AuthenticationManager( ClientSession(loop=event_loop), "abc", "123", "http://localhost" ) mgr.oauth = OAuth2TokenResponse.parse_raw(get_response("auth_oauth2_token")) mgr.user_token = XAUResponse.parse_raw(get_response("auth_user_token")) mgr.xsts_token = XSTSResponse.parse_raw(get_response("auth_xsts_token")) return mgr