Skip to content

Commit

Permalink
fix: test docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
NohaIhab committed Jan 31, 2024
1 parent 73e49eb commit 27db582
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ def test_kubernetes_manifest_relation_data(harness):
@patch("charm.PODDEFAULT_FILE", "non_existent_file.yaml")
def test_incorrect_manifest_path_error_status(harness):
"""
Test when the manifest file is not found, the charm goes to error
with the correct error message.
Test when the manifest file is not found:
1. a FileNotFoundError is raised
2. the charm goes to ErrorStatus
"""
# Arrange
harness.set_leader(True)
Expand All @@ -68,7 +69,10 @@ def test_incorrect_manifest_path_error_status(harness):

@patch("charm.PODDEFAULT_FILE", "./tests/unit/invalid.yaml")
def test_invalid_yaml_error_status(harness):
"""Test when the manifest file is not a valid yaml, the charm goes to error."""
"""Test when the manifest file is not a valid yaml:
1. a yaml ParserError is raised.
2. the charm goes to ErrorStatus
"""
# Arrange
harness.set_leader(True)

Expand Down

0 comments on commit 27db582

Please sign in to comment.