aboutsummaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
authorMichael McVady <femtonaut@gmail.com>2023-02-19 11:57:08 -0600
committerMichael McVady <femtonaut@gmail.com>2023-02-19 11:57:08 -0600
commit011e8d8870a6c14674e5e389bfdc09dae62b948d (patch)
tree44d3fcd211ad2348326c2b78b66c20d9d7add948 /tests.py
parent9092c94ee231e99dc31b1b265179866a404614e4 (diff)
Clean up
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py4
1 files changed, 2 insertions, 2 deletions
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()