Skip to content

Commit

Permalink
Merge pull request #56 from jordiwes/4716-add-colin-flag
Browse files Browse the repository at this point in the history
4716 - changes to add in colin only flag to schema
  • Loading branch information
thorwolpert authored Apr 1, 2021
2 parents 0dfba8c + 6336dcd commit 43c86be
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/registry_schemas/example_data/schema_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'header': {
'name': 'annualReport',
'availableOnPaperOnly': False,
'inColinOnly' : False,
'date': '2019-04-08',
'certifiedBy': 'full name',
'email': '[email protected]',
Expand Down
3 changes: 3 additions & 0 deletions src/registry_schemas/schemas/filing.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
"availableOnPaperOnly": {
"type": "boolean"
},
"inColinOnly": {
"type": "boolean"
},
"date": {
"type": "string",
"format": "date",
Expand Down
15 changes: 15 additions & 0 deletions tests/unit/test_filings.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,21 @@ def test_filing_paper():

assert is_valid

def test_filing_colin_only():
"""Assert that a Colin Only filing is valid."""
filing = copy.deepcopy(FILING_HEADER)
filing['filing']['header']['inColinOnly'] = True

is_valid, errors = validate(filing, 'filing')

if errors:
for err in errors:
print(err.message)
print(errors)

assert is_valid



def test_effective_date():
"""Assert that the effective date is working correctly from a structural POV."""
Expand Down

0 comments on commit 43c86be

Please sign in to comment.