Skip to content

Commit

Permalink
Fix byte and string comparison
Browse files Browse the repository at this point in the history
`response.content` is a `bytes` object and doing a string comparison throws an error
  • Loading branch information
farooqaaa authored and bluetech committed Feb 28, 2022
1 parent 8f4de08 commit 24bb554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ dynamically in a hook or fixture.

@pytest.mark.urls('myapp.test_urls')
def test_something(client):
assert 'Success!' in client.get('/some_url_defined_in_test_urls/').content
assert b'Success!' in client.get('/some_url_defined_in_test_urls/').content


``pytest.mark.ignore_template_errors`` - ignore invalid template variables
Expand Down

0 comments on commit 24bb554

Please sign in to comment.