mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +00:00
Fix Py3 tests using b'' literal
This commit is contained in:
committed by
Jair Henrique
parent
995020bf06
commit
7599f4d50a
@@ -67,7 +67,7 @@ def test_dont_record_on_exception(tmpdir):
|
||||
|
||||
@my_vcr.use_cassette(str(tmpdir.join('dontsave.yml')))
|
||||
def some_test():
|
||||
assert 'Not in content' in urlopen('http://httpbin.org/get')
|
||||
assert b'Not in content' in urlopen('http://httpbin.org/get')
|
||||
|
||||
with pytest.raises(AssertionError):
|
||||
some_test()
|
||||
@@ -77,6 +77,6 @@ def test_dont_record_on_exception(tmpdir):
|
||||
# Make sure context decorator has the same behavior
|
||||
with pytest.raises(AssertionError):
|
||||
with my_vcr.use_cassette(str(tmpdir.join('dontsave2.yml'))):
|
||||
assert 'Not in content' in urlopen('http://httpbin.org/get').read()
|
||||
assert b'Not in content' in urlopen('http://httpbin.org/get').read()
|
||||
|
||||
assert not os.path.exists(str(tmpdir.join('dontsave2.yml')))
|
||||
|
||||
Reference in New Issue
Block a user