Legal API - Outstanding Broken Legal API Tests
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 62
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
Any test broken test that is not part of the work in #19828, #20487, digital credentials and reports, will need to be addressed in this ticket.
**TODOs**
- [ ] Fix outstanding broken unit tests in legal api. Can skip #19828, digital credential, report and `models/test_legal_entity.py` related tests
**_From running tests locally, these are the tests I can see broken. Note: this is a reduced version. A lot of parameterized tests are broken_**
```
FAILED tests/unit/resources/v2/test_business_parties.py::test_get_business_parties_one_party_multiple_roles[public-user-public_user] - AttributeError: can't set attribute 'entity_type'
FAILED tests/unit/resources/v2/test_business_parties.py::test_get_business_parties_multiple_parties - AttributeError: can't set attribute 'entity_type'
FAILED tests/unit/resources/v2/test_business_parties.py::test_get_business_party_by_id - AttributeError: can't set attribute 'entity_type'
FAILED tests/unit/resources/v2/test_business_tasks.py::test_get_tasks_current_year_filing_exists - AssertionError: assert 6 == 1
FAILED tests/unit/resources/v2/test_business_tasks.py::test_temp_reg_filing_task[TODO_EXISTS_DRAFT_FILING-DRAFT-T1234561] - KeyError: 0
FAILED tests/unit/resources/v2/test_ops.py::test_ops_healthz_success - assert 500 == 200
FAILED tests/unit/resources/v2/test_request_tracker.py::test_get_bn_request_trackers - TypeError: factory_legal_entity() got an unexpected keyword argument '_entity_type'
FAILED tests/unit/resources/v2/test_request_tracker.py::test_get_request_tracker - TypeError: factory_legal_entity() got an unexpected keyword argument '_entity_type'
FAILED tests/unit/resources/v2/test_request_tracker.py::test_resubmit_bn_request[1--FM0000001] - TypeError: factory_legal_entity() got an unexpected keyword argument '_entity_type'
FAILED tests/unit/resources/v2/test_business_filings/test_filing_documents.py::test_missing_filing - assert 500 ==
FAILED tests/unit/resources/v2/test_business_filings/test_filing_documents.py::test_unpaid_filing - assert 500 ==
FAILED tests/unit/resources/v2/test_business_filings/test_filing_documents.py::test_document_list_for_various_filing_states[special_res_paper-CP7654321-CP-specialResolution-legal_filing_10-None-None-PAPER_ONLY-expected_msg0-HTTPStatus.NOT_FOUND-None] - assert 500 ==
FAILED tests/unit/resources/v2/test_business_filings/test_filing_documents.py::test_document_list_for_various_filing_states[special_res_pending-CP7654321-CP-specialResolution-legal_filing_11-None-None-PENDING-expected_msg1-HTTPStatus.NOT_FOUND-None] - assert 500 ==
FAILED tests/unit/resources/v2/test_business_filings/test_filing_documents.py::test_get_receipt_request_mock - assert 500 ==
FAILED tests/unit/resources/v2/test_business_filings/test_filings.py::test_get_empty_filings_with_invalid_business - assert 500 ==
FAILED tests/unit/resources/v2/test_business_filings/test_filings.py::test_post_empty_annual_report_to_a_business - assert {'message': "...ation/json'."} == {'detail': "U...is required."}
FAILED tests/unit/resources/v2/test_business_filings/test_filings.py::test_update_ar_with_missing_json_body_fails - assert {'message': "...ation/json'."} == {'detail': "U...is required."}
FAILED tests/unit/resources/v2/test_business_filings/test_internal.py::test_post_pre_load_colin_filing - assert 403 ==
FAILED tests/unit/resources/v2/test_business_filings/test_internal.py::test_post_colin_last_update - AssertionError: assert {'id': 3, 'la...017644+00:00'} == {'maxId': 1234}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the listed tests under tests/unit/resources/v2/, excluding the tests covered by #19828, #20487, digital credentials, reports, and models/test_legal_entity.py. Group the failures by test file and verify the full legal API test set passes without the excluded areas remaining broken.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- api, backend, testing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100