def test_auto_refresh_pkce_token(self): c = Credentials('id') token = make_token(uses_pkce=True) c.refresh_pkce_token = MagicMock(return_value=token) c.refresh(token) c.refresh_pkce_token.assert_called_once() c.close()
def test_refresh_pkce_token(self): c = Credentials('id') c.send = MagicMock(return_value=mock_response()) token = c.refresh_pkce_token('refresh') assert token.uses_pkce