Skip to content
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

Edit login user functions to return the User #1013

Merged
merged 57 commits into from
Aug 7, 2023

Conversation

michplunkett
Copy link
Collaborator

@michplunkett michplunkett commented Aug 7, 2023

Fixes issue

#1010

Description of Changes

Edit the login_user functions so that they return the user (removing the need for an extra database query) and create constants for the login values.

Tests and linting

  • This branch is up-to-date with the develop branch.
  • pytest passes on my local development environment.
  • pre-commit passes on my local development environment.

@michplunkett michplunkett self-assigned this Aug 7, 2023
@michplunkett michplunkett linked an issue Aug 7, 2023 that may be closed by this pull request
@@ -336,7 +338,6 @@ def test_admin_approval_sends_confirmation_email(
session,
):
current_app.config["APPROVE_REGISTRATIONS"] = approve_registration_config
EmailClient(testing=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been moved to a test fixture.

@michplunkett michplunkett marked this pull request as ready for review August 7, 2023 17:33
Comment on lines +105 to +107
def test_job_repr(mockdata):
job = Job.query.first()
assert repr(job) == f"<Job ID {job.id}: {job.job_title}>"
Copy link
Collaborator Author

@michplunkett michplunkett Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw the test was missing so I added it.

Copy link
Member

@b-meson b-meson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this looks great.

@michplunkett michplunkett merged commit 72747d1 into develop Aug 7, 2023
2 checks passed
@michplunkett michplunkett deleted the edit_login_user_funcs branch August 7, 2023 21:52
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this pull request Sep 25, 2023
lucyparsons#1010

Edit the `login_user` functions so that they return the user (removing
the need for an extra database query) and create constants for the login
values.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this pull request Sep 25, 2023
lucyparsons#1010

Edit the `login_user` functions so that they return the user (removing
the need for an extra database query) and create constants for the login
values.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this pull request Oct 9, 2023
lucyparsons#1010

Edit the `login_user` functions so that they return the user (removing
the need for an extra database query) and create constants for the login
values.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
AetherUnbound pushed a commit to OrcaCollective/OpenOversight that referenced this pull request Nov 11, 2023
lucyparsons#1010

Edit the `login_user` functions so that they return the user (removing
the need for an extra database query) and create constants for the login
values.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edit login_user test functions so they return the user
2 participants