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

Refactor CatalogueCategoryRepo unit tests #305 #307

Merged
merged 15 commits into from
Jul 26, 2024

Conversation

joelvdavies
Copy link
Collaborator

@joelvdavies joelvdavies commented Jun 25, 2024

Description

Refactors catalogue category repo unit tests in same format as in #302 as part of #90. There are also some minor changes to the previous tests refactored in that PR as I noticed a few minor inconsistencies while creating this one.

  • Also changed the base RepoDSL to contain utilities for _has_child_elements and _is_duplicate as they are repeated, particularly inside the CatalogueCategory unit tests as there they are used via delete and the specific has_child_elements tests.
  • Added a check on the created and modified times inside systems update e2e tests. I meant to do this before but forgot.
  • Changed System to system in all comments and error messages (unless its the first word) for consistency.
  • Replaced self.test_helpers. with RepositoryTestHelpers. for SystemsRepo and CatalogueCategoryRepo unit tests.

Testing instructions

  • Review code
  • Check Actions build
  • Review changes to test coverage

Agile board tracking

Closes #305

@joelvdavies joelvdavies added the enhancement New feature or request label Jun 25, 2024
@joelvdavies joelvdavies self-assigned this Jun 25, 2024
test/e2e/test_system.py Outdated Show resolved Hide resolved
@joelvdavies joelvdavies changed the title Initial refactoring of catalogue category repo unit tests #305 Refactor CatalogueCategoryRepo unit tests #305 Jun 26, 2024
@joelvdavies joelvdavies marked this pull request as ready for review June 26, 2024 15:13
@joelvdavies joelvdavies requested a review from VKTB June 26, 2024 15:13
test/e2e/test_catalogue_category.py Show resolved Hide resolved
test/unit/repositories/test_system.py Show resolved Hide resolved
test/unit/repositories/test_system.py Show resolved Hide resolved
@joelvdavies
Copy link
Collaborator Author

Just gone through the comments, and have mentioned where they were already present in #315, otherwise I fixed them in the latest commit there 9ea1038.

@joelvdavies joelvdavies requested a review from VKTB July 16, 2024 08:22
@joelvdavies
Copy link
Collaborator Author

Addressed further unresolved comments on 1a20bbf.

@joelvdavies joelvdavies requested a review from VKTB July 24, 2024 14:15
@joelvdavies joelvdavies merged commit 8f3ad25 into develop Jul 26, 2024
7 checks passed
@joelvdavies joelvdavies deleted the refactor-cc-repo-unit-tests-#305 branch July 26, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor catalogue category repo unit tests
2 participants