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

PLAT-160: Migrate test_privileges #1132

Merged
merged 11 commits into from
Dec 13, 2023

Conversation

ethho
Copy link
Contributor

@ethho ethho commented Dec 13, 2023

  • No changes from previous PRs. This branch was forked directly from dev-tests
  • cp to tests
  • Migrate TestUnprivileged
  • Format with black
  • Separate fixture for DB creds dict
  • First pass at migrating test_privileges
  • Clean up

@ethho ethho requested a review from A-Baji December 13, 2023 17:52
@@ -52,12 +53,17 @@ def enable_filepath_feature(monkeypatch):


@pytest.fixture(scope="session")
def connection_root_bare():
connection = dj.Connection(
def db_creds_root() -> Dict:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the value of os.getenv("DJ_HOST") in several test modules. Best to perform this once and inject it as a fixture. Making a note to replace the pattern os.getenv("DJ_HOST") with this fixture in other modules besides test_privileges.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another thing that we should move to fixtures during the "big clean up".

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why can't we just import CONN_INFO (as done in #1133)

@ethho ethho marked this pull request as ready for review December 13, 2023 18:03
@A-Baji A-Baji merged commit 88ca9b6 into datajoint:dev-tests Dec 13, 2023
9 checks passed
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.

2 participants