Skip to content

Commit

Permalink
Unittest awkward failure
Browse files Browse the repository at this point in the history
  • Loading branch information
juditnovak committed Aug 31, 2023
1 parent 7ca53a9 commit 75f7f1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/v0/test_data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_action_params_parsing_ok(self):
mock_event.params = {"host": "my-host"}
with self.assertLogs(level="INFO") as logger:
self.assertTrue(self.harness.charm._set_server_action(mock_event))
self.assertEqual(sorted(logger.output), ["INFO:unit.test_data_models:my-host:80"])
self.assertEqual(sorted(logger.output), ["INFO:test_data_models:my-host:80"])

def test_action_params_parsing_ko(self):
"""Test that action parameters validation would raise an exception."""
Expand All @@ -198,7 +198,7 @@ def test_relation_databag_io(self):

with self.assertLogs(level="INFO") as logger:
self.harness.update_relation_data(relation_id, "mongodb", {"key": "1.0"})
self.assertEqual(logger.output, ["INFO:unit.test_data_models:Field type: <class 'float'>"])
self.assertEqual(logger.output, ["INFO:test_data_models:Field type: <class 'float'>"])

def test_relation_databag_merged(self):
"""Test that relation databag of unit and app can be read and merged into a single pydantic object."""
Expand Down

0 comments on commit 75f7f1a

Please sign in to comment.