aboutsummaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
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()