Skip to content

Commit

Permalink
fix test_portfolio
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed Jan 28, 2025
1 parent 8faffef commit 7a79b5f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 36 deletions.
34 changes: 16 additions & 18 deletions src/server/oasisapi/portfolios/v1_api/tests/test_portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,27 +1184,25 @@ def test_account_file__is_invalid__response_is_400(self):
)
self.assertEqual(400, validate_response.status_code)
self.assertEqual(validate_response.json, [
['account', 'missing required column AccCurrency'],
['account', 'missing required column PolNumber'],
['account', 'missing required column PolPerilsCovered'],
['account', "column 'LocNumber' is not a valid oed field"],
['account', "column 'IsTenant' is not a valid oed field"],
['account', "column 'BuildingID' is not a valid oed field"],
['account', "column 'CountryCode' is not a valid oed field"],
['account', "column 'Latitude' is not a valid oed field"],
['account', "column 'Longitude' is not a valid oed field"],
['account', "column 'StreetAddress' is not a valid oed field"],
['account', "column 'PostalCode' is not a valid oed field"],
['account', "column 'OccupancyCode' is not a valid oed field"],
['account', "column 'ConstructionCode' is not a valid oed field"],
['account', "column 'LocPerilsCovered' is not a valid oed field"],
['account', "column 'BuildingTIV' is not a valid oed field"],
['account', "column 'OtherTIV' is not a valid oed field"],
['account', "column 'ContentsTIV' is not a valid oed field"],
['account', "column 'BITIV' is not a valid oed field"],
['account', 'missing required column AccCurrency'],
['account', 'missing required column PolNumber'],
['account', 'missing required column PolPerilsCovered'],
['account', "column 'LocNumber' is not a valid oed field"],
['account', "column 'IsTenant' is not a valid oed field"],
['account', "column 'BuildingID' is not a valid oed field"],
['account', "column 'Latitude' is not a valid oed field"],
['account', "column 'Longitude' is not a valid oed field"],
['account', "column 'OccupancyCode' is not a valid oed field"],
['account', "column 'ConstructionCode' is not a valid oed field"],
['account', "column 'LocPerilsCovered' is not a valid oed field"],
['account', "column 'BuildingTIV' is not a valid oed field"],
['account', "column 'OtherTIV' is not a valid oed field"],
['account', "column 'ContentsTIV' is not a valid oed field"],
['account', "column 'BITIV' is not a valid oed field"],
['account', "column 'LocCurrency' is not a valid oed field"]
])


def test_reinsurance_info_file__is_invalid__response_is_400(self):
content_type = 'text/csv'
test_data = pd.read_csv(io.StringIO(LOCATION_DATA_VALID))
Expand Down
35 changes: 17 additions & 18 deletions src/server/oasisapi/portfolios/v2_api/tests/test_portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1428,27 +1428,26 @@ def test_account_file__is_invalid__response_is_400(self):
)
self.assertEqual(400, validate_response.status_code)
self.assertEqual(validate_response.json, [
['account', 'missing required column AccCurrency'],
['account', 'missing required column PolNumber'],
['account', 'missing required column PolPerilsCovered'],
['account', "column 'LocNumber' is not a valid oed field"],
['account', "column 'IsTenant' is not a valid oed field"],
['account', "column 'BuildingID' is not a valid oed field"],
['account', "column 'CountryCode' is not a valid oed field"],
['account', "column 'Latitude' is not a valid oed field"],
['account', "column 'Longitude' is not a valid oed field"],
['account', "column 'StreetAddress' is not a valid oed field"],
['account', "column 'PostalCode' is not a valid oed field"],
['account', "column 'OccupancyCode' is not a valid oed field"],
['account', "column 'ConstructionCode' is not a valid oed field"],
['account', "column 'LocPerilsCovered' is not a valid oed field"],
['account', "column 'BuildingTIV' is not a valid oed field"],
['account', "column 'OtherTIV' is not a valid oed field"],
['account', "column 'ContentsTIV' is not a valid oed field"],
['account', "column 'BITIV' is not a valid oed field"],
['account', 'missing required column AccCurrency'],
['account', 'missing required column PolNumber'],
['account', 'missing required column PolPerilsCovered'],
['account', "column 'LocNumber' is not a valid oed field"],
['account', "column 'IsTenant' is not a valid oed field"],
['account', "column 'BuildingID' is not a valid oed field"],
['account', "column 'Latitude' is not a valid oed field"],
['account', "column 'Longitude' is not a valid oed field"],
['account', "column 'OccupancyCode' is not a valid oed field"],
['account', "column 'ConstructionCode' is not a valid oed field"],
['account', "column 'LocPerilsCovered' is not a valid oed field"],
['account', "column 'BuildingTIV' is not a valid oed field"],
['account', "column 'OtherTIV' is not a valid oed field"],
['account', "column 'ContentsTIV' is not a valid oed field"],
['account', "column 'BITIV' is not a valid oed field"],
['account', "column 'LocCurrency' is not a valid oed field"]
])



def test_reinsurance_info_file__is_invalid__response_is_400(self):
content_type = 'text/csv'
test_data = pd.read_csv(io.StringIO(LOCATION_DATA_VALID))
Expand Down

0 comments on commit 7a79b5f

Please sign in to comment.