We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@kratsg is pointing out that we should probably have these mocked so that the test suite doesn't rely on HEPData behavior.
Example of something similar he's done recently
def test_user_expires_reauthenticate(user_temp, requests_mock, mocker): user, _ = user_temp assert user.is_authenticated() assert user.is_expired() == False assert user.expires_in > 0 user._id_token['exp'] = time.time() - 1 assert user.is_authenticated() assert user.is_expired() assert user.expires_in == 0 mock = mocker.patch.object(user, '_parse_id_token') requests_mock.post( requests.compat.urljoin(itkdb.settings.ITKDB_AUTH_URL, 'grantToken'), text=json.dumps( { 'id_token': { 'exp': time.time() + 3600, 'name': _name, 'uuidentity': _identity, }, 'access_token': _access_token, } ), ) user.authenticate() user._id_token = {'exp': time.time() + 3600, 'name': _name, 'uuidentity': _identity} assert user.is_authenticated() assert user.is_expired() == False
Originally posted by @matthewfeickert in #1485 (comment)
The text was updated successfully, but these errors were encountered:
matthewfeickert
Successfully merging a pull request may close this issue.
@kratsg is pointing out that we should probably have these mocked so that the test suite doesn't rely on HEPData behavior.
Example of something similar he's done recently
Originally posted by @matthewfeickert in #1485 (comment)
The text was updated successfully, but these errors were encountered: