Skip to content

Commit

Permalink
updated assertions in tests to match new exceptions #88
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGuarnaccia5 committed Jul 1, 2024
1 parent c98e731 commit 9b1297e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/maintenance/test_maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_get_maintenance_state_invalid_file():

with pytest.raises(InvalidMaintenanceFileError) as exc:
maintenance.get_maintenance_state()
assert str(exc.value) == "Maintenance file format is incorrect"
assert str(exc.value) == "An error occurred while validating the data in the maintenance file"

def test_get_maintenance_state_missing_file():
with patch("builtins.open", mock_open()) as mocked_open:
Expand All @@ -52,7 +52,7 @@ def test_get_maintenance_state_missing_file():

with pytest.raises(MaintenanceFileReadError) as exc:
maintenance.get_maintenance_state()
assert str(exc.value) == "Unable to find maintenance file"
assert str(exc.value) == "An error occurred while trying to find and read the maintenance file"


def test_get_scheduled_maintenance_state():
Expand Down Expand Up @@ -88,7 +88,7 @@ def test_get_scheduled_maintenance_state_invalid_file():

with pytest.raises(InvalidMaintenanceFileError) as exc:
maintenance.get_scheduled_maintenance_state()
assert str(exc.value) == "Scheduled maintenance file format is incorrect"
assert str(exc.value) == "An error occurred while validating the data in the scheduled maintenance file"

def test_get_scheduled_maintenance_state_missing_file():
with patch("builtins.open", mock_open()) as mocked_open:
Expand All @@ -97,4 +97,4 @@ def test_get_scheduled_maintenance_state_missing_file():

with pytest.raises(MaintenanceFileReadError) as exc:
maintenance.get_scheduled_maintenance_state()
assert str(exc.value) == "Unable to find scheduled maintenance file"
assert str(exc.value) == "An error occurred while trying to find and read the scheduled maintenance file"

0 comments on commit 9b1297e

Please sign in to comment.