Skip to content

Conversation

@IsaacMilarky
Copy link
Contributor

@IsaacMilarky IsaacMilarky commented Dec 9, 2025

Amendments to Fixtures and Test cases

Jira Ticket #NDH-324

Problem

The current state of the amended test fixtures is not quite to specification for ticket NDH-324. Also, the fixtures file is getting to be very large and needs to be turned into a module of separate files.

Solution

Amend the test cases to check all returned data and make sure that we aren't getting back data that was not supposed to be fetched by the given filter parameter. Also, improve the tests by adding additional fixture data that adds a non NPI identifier. Additionally, improve the test cases by making sure all assertions match the filters.

I have also created a new fixtures module to replace the fixtures.py file because it was getting to be pretty large.

Result

Summary:

  • Amend test cases to check all results
  • Amend fixture data to create a practitioner with a non NPI identifier
  • Amend address test case to test for a more specific search parameter than "Street"
  • Test that the address part of the returned data includes use data
  • Amend test case to check the 'use' field instead of other identifying data
  • Edit test data fixture to have multiple codes

The amended tests have also exposed some issues in the code-base. Namely, the test that checks to see if the identifier filter can fetch non NPI identifiers does not find that identifier in the returned data. I think this is because the non NPI identifier is just not present in the serialized data although the correct record does appear to be fetched.

Additionally, the tests have also found that the 'use' field is missing from the returned practitioner data address field.

I also ran make format so there have been a bunch of formatting changes from ruff.

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Backend Django Test Results

98 tests  ±0   96 ✅  - 2   1s ⏱️ ±0s
13 suites ±0    0 💤 ±0 
13 files   ±0    2 ❌ +2 

For more details on these failures, see this check.

Results for commit 81cd86c. ± Comparison against base commit 7aac220.

♻️ This comment has been updated with latest results.

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
@IsaacMilarky IsaacMilarky marked this pull request as ready for review December 9, 2025 23:08
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Copy link
Contributor

@spopelka-dsac spopelka-dsac left a comment

Choose a reason for hiding this comment

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

It looks like the broken address_sue test is specifically a problem with how this line is trying to identify whether an address use is present:

if "use" in representation.keys():

Can you please fix that line so that the test_list_filter_by_address_use test will pass?

The test_list_filter_by_npi_general failure is a result of the test needing to be updated, as I noted in my comment on the test.

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
…ss when transformed into a string

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Copy link
Contributor

@spopelka-dsac spopelka-dsac left a comment

Choose a reason for hiding this comment

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

We're getting close!

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
spopelka-dsac
spopelka-dsac previously approved these changes Jan 6, 2026
Copy link
Contributor

@spopelka-dsac spopelka-dsac left a comment

Choose a reason for hiding this comment

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

Much better, thanks!

@spopelka-dsac
Copy link
Contributor

@IsaacMilarky Can you resolve the conflict in Developers.content.md? I think fixing that will cause the failing frontend test to pass.

Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Copy link
Contributor

@spopelka-dsac spopelka-dsac left a comment

Choose a reason for hiding this comment

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

Woohoo! Love passing tests!

@spopelka-dsac spopelka-dsac merged commit c897a88 into main Jan 6, 2026
10 checks passed
@IsaacMilarky IsaacMilarky deleted the isaacmilarky/NDH-324-amendments-to-fixtures-and-test-cases branch January 6, 2026 18:12
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.

3 participants