Skip to content

Commit 24bb554

Browse files
farooqaaabluetech
authored andcommitted
Fix byte and string comparison
`response.content` is a `bytes` object and doing a string comparison throws an error
1 parent 8f4de08 commit 24bb554

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/helpers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ dynamically in a hook or fixture.
119119

120120
@pytest.mark.urls('myapp.test_urls')
121121
def test_something(client):
122-
assert 'Success!' in client.get('/some_url_defined_in_test_urls/').content
122+
assert b'Success!' in client.get('/some_url_defined_in_test_urls/').content
123123

124124

125125
``pytest.mark.ignore_template_errors`` - ignore invalid template variables

0 commit comments

Comments
 (0)