-
Notifications
You must be signed in to change notification settings - Fork 3
feat/github-issue-48-django-test-coverage #69
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
Merged
travis-sauer-oltech
merged 22 commits into
main
from
feat/github-issue-48-django-test-coverage
Apr 19, 2025
Merged
feat/github-issue-48-django-test-coverage #69
travis-sauer-oltech
merged 22 commits into
main
from
feat/github-issue-48-django-test-coverage
Apr 19, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Implemented unit tests for JheUser, Organization, Patient, and other models. * Created test settings and runner for Django tests. * Removed obsolete test file and added new test structure for better organization.
* Simplified run-name and echo statements for better readability. * Standardized naming conventions for steps. * Removed unnecessary comments and emojis for a cleaner output.
…ng tests * Included a step to locate `manage.py` to ensure the correct directory is accessed for running Django tests.
* Changed the Python setup step to specify version 3.11. * Ensures compatibility with the latest features and improvements in Django.
…e installing dependencies * Moved the step to find `manage.py` location above the dependency installation step for better clarity and organization. * cd into jhe on the Pipenv step
…kflow * Added necessary environment variables for the Django application. * Ensured the workflow has all required configurations for testing.
* Changed `run-name` to provide detailed context during workflow execution. * Removed workflow steps from __init__.py under tests directory
* Improved the formatting of the `run-name` in the GitHub Actions workflow for better readability.
…`Patient`, and related models * Updated old 'tests.py' file to reflect file's test coverage *Introduced tests for email verification, and authorization code generation. * Added organization relationship tests and patient consent scope methods. * Implemented tests for study and observation functionalities, ensuring robust coverage.
* Changed workflow name to `Django Backend Test` for clarity. * Updated `run-name` format for better readability. * Modified test pattern to `test*.py` to ensure all relevant tests are executed.
* Introduced `@override_settings` for in-memory SQLite database in `base_model_tests.py` and `test_model_methods.py`. * Removed `test_settings.py` as its functionality is now integrated into the test files.
…s.py override * Introduced a new `test_settings.py` file to configure an in-memory SQLite database for tests. * Updated the test command in the GitHub Actions workflow to specify the test settings. * Removed redundant database settings from individual test files to streamline test configuration.
* Changed the test settings reference from `jhe.settings.test` to `jhe.test_settings` in the GitHub Actions workflow.
…Actions * Added PostgreSQL service with health checks for the test suite. * Updated database settings to use environment variables for better configuration management. * Changed database engine from SQLite to PostgreSQL for consistency with production.
* Upgraded the PostgreSQL service image from version 13 to 16 in the GitHub Actions workflow. * This change ensures compatibility with the latest features and improvements in PostgreSQL.
* Simplified the `for_practitioner_organization_study`, `for_practitioner_organization`, and `for_practitioner_organization_study_patient` methods by: - Setting default values for `page` and `pageSize`. - Removing redundant checks for "null" values. * Improved readability and maintainability of the code.
* Removed `--keepdb` option from the test command to ensure a fresh database for each test run. * Updated comments for clarity regarding coverage testing.
* Disabled migrations for the `oauth2_provider` app to speed up tests. * This change assumes that the app is already migrated in the main database.
* Adjusted the test command to ensure it uses the correct settings file. * Prepared for future coverage testing by commenting out the coverage command.
* Adjusted assertions in `test_for_practitioner_organization_study` and `test_count_for_practitioner_organization_study_patient` to allow for zero patients. * Enhanced `test_practitioner_authorized` to ensure user is linked to the organization before authorization checks. * Improved `test_count_for_practitioner_organization_study_patient` to create necessary study and consent for accurate testing.
* Changed the workflow trigger branches from `feat/github-issue-48-django-test-coverage` to `main` for both push and pull_request events. * Ensured consistency in the workflow execution context.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.