def test_oauth_login_unknown_provider(self):
        """
        OAuth: Test login with unknown provider
        """
        self.appbuilder.sm.oauth_remotes = {"google": OAuthRemoteMock()}

        raw_state = {}
        state = jwt.encode(raw_state, "random_state", algorithm="HS256")
        with self.app.test_client() as client:
            with client.session_transaction() as session:
                session["oauth_state"] = "random_state"

        response = client.get(f"/oauth-authorized/unknown_provider?state={state}")
        self.assertEqual(response.location, "/login/")

        OAuth: Test login with unknown provider
        
tests/test_mvc_oauth.py