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

Testing: Contraint when there are multiple validation errors #667

Open
odscrachel opened this issue Apr 24, 2024 · 0 comments
Open

Testing: Contraint when there are multiple validation errors #667

odscrachel opened this issue Apr 24, 2024 · 0 comments
Labels
tests Schema tests

Comments

@odscrachel
Copy link
Collaborator

We encountered a constraint when testing fields that produce more than one error. For example recordType being required. When recordType is removed in an invalid test file, it fails on requirements but also for the other required fields in entity/person statements.


[
    {
        "statementId": "733b20a572f8b306b538344c7946c9cb",
        "recordId": "per-5faa4103dee78621",
        "recordStatus": "new",
        "declarationSubject": "ent-93c75c87ab28f889",
        "statementDate": "2017-11-18",
        "recordDetails": {
            "isComponent": false,
            "personType": "knownPerson"
        }
    }
]

Gives the error

AssertionError: Expecting 1 validation error, 2 found: 'entityType' is a required property; 'subject' is a required property; 'interestedParty' is a required property; 'recordType' is a required property.

@StephenAbbott StephenAbbott added the tests Schema tests label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Schema tests
Projects
None yet
Development

No branches or pull requests

2 participants