Exemple #1
0
    def test_get_auth_response_with_inconsistent_state(self, webbrowser_mock,
                                                       get_user_input_mock):
        oauth = SpotifyOAuth("CLID", "CLISEC", "redir.io", state='wxyz')

        with self.assertRaises(SpotifyStateError):
            oauth.get_auth_response()
Exemple #2
0
 def test_get_auth_response_with_consistent_state(self, webbrowser_mock,
                                                  get_user_input_mock):
     oauth = SpotifyOAuth("CLID", "CLISEC", "redir.io", state='wxyz')
     code = oauth.get_auth_response()
     self.assertEqual(code, "abcde")