-
Notifications
You must be signed in to change notification settings - Fork 339
Session Management API #147
New issue
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
Conversation
finally: | ||
firebase_admin.delete_app(app) | ||
|
||
@pytest.mark.parametrize('env_var_app', [{'GCLOUD_PROJECT': 'mock-project-id'}], indirect=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below, why parametrize for a single test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are passed indirectly (indirect=True
) to a fixture.
assert claims['subscription'] == 'silver' | ||
assert claims['iss'].startswith('https://session.firebase.google.com') | ||
estimated_exp = int(time.time() + expires_in.total_seconds()) | ||
assert abs(claims['exp'] - estimated_exp) < 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 5 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arbitrary. It's the same value we used in Node.js tests.
Adds 2 new functions to the
auth
module: