diff --git a/consumer_api/tests/log_view_test.py b/consumer_api/tests/log_view_test.py index 2b619b9..195be38 100644 --- a/consumer_api/tests/log_view_test.py +++ b/consumer_api/tests/log_view_test.py @@ -1,3 +1,6 @@ +import json +import os + import pytest from flask import current_app @@ -10,14 +13,18 @@ def client(): with current_app.test_client() as client: yield client + def test_log_code_get(client): r = client.get('/log') assert r.status_code == 405 + def test_log_code_post(client): - r = client.get('/log') + data = { + "uuid": os.environ["LOCAL_UUID"], + "message": "Hello There!" + } + r = client.post('/log', data = json.dumps(data)) assert r.status_code == 204 - -