Skip to content

Commit

Permalink
Fix tests after refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MHHukiewitz committed Feb 13, 2024
1 parent 9bd0cc6 commit 910bb7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aleph_message/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def check_item_content(cls, v: Optional[str], values) -> Optional[str]:
return v

@validator("content")
def check_content(self, v, values):
def check_content(cls, v, values):
"""Check that the content matches the serialized item_content"""
item_type = values["item_type"]
if item_type != ItemType.inline:
Expand All @@ -215,7 +215,8 @@ def check_content(self, v, values):
json_dump = json.loads(v.json())
for key, value in json_dump.items():
if value != item_content[key]:
self._raise_value_error(item_content, key, value)
cls._raise_value_error(item_content, key, value)
return v

@staticmethod
def _raise_value_error(item_content, key, value):
Expand Down

0 comments on commit 910bb7a

Please sign in to comment.