diff options
Diffstat (limited to 'tests.py')
-rwxr-xr-x | tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |