1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 17:15:35 +00:00

fix #429: include a trailing newline in the JSON cassette format

It is a common convention for text files (esp. in Linux) to end with a newline.
This commit is contained in:
Aaron Robson
2020-01-12 20:00:21 +00:00
committed by Kevin McCarthy
parent a351621d92
commit 1d0fdbaa13
2 changed files with 4 additions and 2 deletions

View File

@@ -13,7 +13,9 @@ def test_set_serializer_default_config(tmpdir, httpbin):
urlopen(httpbin.url + "/get")
with open(str(tmpdir.join("test.json"))) as f:
assert json.loads(f.read())
file_content = f.read()
assert file_content.endswith("\n")
assert json.loads(file_content)
def test_default_set_cassette_library_dir(tmpdir, httpbin):