From 53f686aa5b2272d7a507eb975ba9a96807a2d921 Mon Sep 17 00:00:00 2001 From: Jair Henrique Date: Mon, 11 Dec 2023 17:28:16 -0300 Subject: [PATCH] Refactor test to not use tox.ini file --- tests/integration/test_requests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/test_requests.py b/tests/integration/test_requests.py index 48590fc..10cbd21 100644 --- a/tests/integration/test_requests.py +++ b/tests/integration/test_requests.py @@ -265,7 +265,7 @@ def test_nested_cassettes_with_session_created_before_nesting(httpbin_both, tmpd def test_post_file(tmpdir, httpbin_both): """Ensure that we handle posting a file.""" url = httpbin_both + "/post" - with vcr.use_cassette(str(tmpdir.join("post_file.yaml"))) as cass, open("tox.ini", "rb") as f: + with vcr.use_cassette(str(tmpdir.join("post_file.yaml"))) as cass, open(".editorconfig", "rb") as f: original_response = requests.post(url, f).content # This also tests that we do the right thing with matching the body when they are files. @@ -273,10 +273,10 @@ def test_post_file(tmpdir, httpbin_both): str(tmpdir.join("post_file.yaml")), match_on=("method", "scheme", "host", "port", "path", "query", "body"), ) as cass: - with open("tox.ini", "rb") as f: - tox_content = f.read() - assert cass.requests[0].body.read() == tox_content - with open("tox.ini", "rb") as f: + with open(".editorconfig", "rb") as f: + editorconfig = f.read() + assert cass.requests[0].body.read() == editorconfig + with open(".editorconfig", "rb") as f: new_response = requests.post(url, f).content assert original_response == new_response