-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Added test for authentication #5517
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
| with app.test_request_context(): | ||
| auth_manager = AuthManager() | ||
| auth_manager.init_login(app) | ||
| user = create_user(email = '[email protected]', password = 'password') |
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.
unexpected spaces around keyword / parameter equals
| """Method to test the registered user details""" | ||
|
|
||
| with app.test_request_context(): | ||
| auth_manager = AuthManager() |
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.
'AuthManager' may be undefined, or defined from star imports: app.api.helpers.auth
| from tests.all.integration.auth_helper import create_user | ||
| from app.api.helpers.db import save_to_db | ||
| from tests.all.integration.utils import OpenEventTestCase | ||
| from app.api.helpers.auth import * |
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.
'from app.api.helpers.auth import *' used; unable to detect undefined names
| @@ -0,0 +1,21 @@ | |||
| from app import current_app as app | |||
| from tests.all.integration.auth_helper import create_user | |||
| from app.api.helpers.db import save_to_db | |||
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.
'app.api.helpers.db.save_to_db' imported but unused
| with app.test_request_context(): | ||
| auth_manager = auth.AuthManager() | ||
| auth_manager.init_login(app) | ||
| user = create_user(email = '[email protected]', password = 'password') |
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.
unexpected spaces around keyword / parameter equals
Codecov Report
@@ Coverage Diff @@
## development #5517 +/- ##
===============================================
+ Coverage 63.03% 63.11% +0.07%
===============================================
Files 264 265 +1
Lines 12702 12721 +19
===============================================
+ Hits 8007 8029 +22
+ Misses 4695 4692 -3
Continue to review full report at Codecov.
|
…ia#5512) Added package in local installation docs Added test for authentication Added docstring for auth test Unused modules of auth test removed Added package in local installation docs (fossasia#5515) Changed module import style test exception handled User import Whitespace commit Export csv support for sessions Add test database instructions Update local.md Added test for authentication (fossasia#5517) * Added package in local installation docs * Added test for authentication * Added docstring for auth test * Unused modules of auth test removed * Changed module import style * test exception handled * User import * Whitespace commit Remove authorisation constraint for discount and access code list Fix Admin Sales Api (fossasia#5528) Add hooks for admin statistics (fossasia#5530) removed unused packages continuation line indent' removed test doc commmit to separate PR Removed redundant print statement Add seed data for custom placeholders (fossasia#5533) Disable registrat constraint to update attendees (fossasia#5544) Frontend follows a flow where non registrar user has to edit an attendee while placing an order. remove marketer and service fee constraints Currently, the APIs are not functioning correctly with these intricate configurations. docs(api): Remove unused line no 24100 in API blueprint (fossasia#5541) Orders API: Remove verified user constraint (fossasia#5548) Lax permissions to view discount codes (fossasia#5551) Read from environment variables when creating the super admin user Added test database docs for running tests locally (fossasia#5539) * Added package in local installation docs * Added test for authentication * Added docstring for auth test * Unused modules of auth test removed * Changed module import style * test exception handled * User import * Whitespace commit * Add test database instructions * Update local.md * Export csv support for sessions * removed unused packages * continuation line indent' * removed test doc commmit to separate PR * Added test database docs * Added instructions for test database docs Removed stream response removed unnecessary import Add seed data for custom placeholders (fossasia#5533) Disable registrat constraint to update attendees (fossasia#5544) Frontend follows a flow where non registrar user has to edit an attendee while placing an order. remove marketer and service fee constraints Currently, the APIs are not functioning correctly with these intricate configurations. docs(api): Remove unused line no 24100 in API blueprint (fossasia#5541) Orders API: Remove verified user constraint (fossasia#5548) Lax permissions to view discount codes (fossasia#5551) Read from environment variables when creating the super admin user Added test database docs Added fields for csv export sessions
* Added package in local installation docs * Added test for authentication * Added docstring for auth test * Unused modules of auth test removed * Changed module import style * test exception handled * User import * Whitespace commit
Fixes #5320
Checklist
developmentbranch.Short description of what this resolves:
Builds up on the code coverage and testability of the authentication feature.
Changes proposed in this pull request: