Skip to content

Commit

Permalink
Fix type assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Apr 14, 2024
1 parent 658d4ee commit 5728e26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def from_file(filename: str, extension: str = "html") -> "FakeResponse":

@staticmethod
def from_json(filename: str, extension: str = "json") -> "FakeResponse":
return FakeResponse(get_test_json(filename, extension))
data = get_test_json(filename, extension)
assert isinstance(data, dict)
return FakeResponse(data)

@staticmethod
def ajax_from_file(filename: str, extension: str = "html") -> "FakeResponse":
Expand Down

0 comments on commit 5728e26

Please sign in to comment.