Skip to content

Commit

Permalink
cleaner to compare to json
Browse files Browse the repository at this point in the history
For future reference, you can break the string up into pieces to avoid
the long line.
  • Loading branch information
mitchelljkotler authored and jimkang committed Dec 12, 2022
1 parent bbe541a commit 85d9344
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions documentcloud/documents/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ def test_create_freestanding_entity(self, client, document, user, mocker):
)

assert response.status_code == status.HTTP_201_CREATED
assert (
response.content
== b'{"name":"Dog","kind":"unknown","metadata":{"wikipedia_url":"https://en.wikipedia.org/wiki/Dog"}}' # pylint: disable=line-too-long
)
assert response.json() == entity_body
_get_or_create_entities.assert_called_once_with([entity_body])


Expand Down

0 comments on commit 85d9344

Please sign in to comment.