From 011e8d8870a6c14674e5e389bfdc09dae62b948d Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Sun, 19 Feb 2023 11:57:08 -0600 Subject: Clean up --- tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests.py') diff --git a/tests.py b/tests.py index 89b980d..f07b397 100755 --- a/tests.py +++ b/tests.py @@ -18,6 +18,7 @@ JSON_ACCEPT_HEADER = {"Accept": "application/json"} log = logging.getLogger(__name__) log.setLevel(logging.INFO) + def test_redirect(): url = f"{BASE_URL}/asdf" r = requests.get(url, allow_redirects=False) @@ -100,8 +101,7 @@ def test_json_get_posts(): def test_json_post_posts(): url = f"{BASE_URL}/posts" - uuid_ = str(uuid.uuid4()) - data = {"id": uuid_, "title": "title", "body": "body"} + data = {"id": str(uuid.uuid4()), "title": "title", "body": "body"} r = requests.post(url, headers=JSON_ACCEPT_HEADER, json=data) assert r.status_code == 201 j = r.json() -- cgit v1.2.3