def test_invalid_refresh(self): auth = Auth(self.base_url, self.client_id, self.secret, self.username, self.password) auth._request_a_token() with self.assertRaises(requests.exceptions.HTTPError): auth._refresh_token = "coucou" auth._refresh_the_token()
def test_valid(self): auth = Auth(self.base_url, self.client_id, self.secret, self.username, self.password) auth._request_a_token() auth._refresh_the_token()