From 32648d0f7a4a6d538cde254b600d85841627a213 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 13 May 2020 14:22:48 +0200 Subject: [PATCH] tests added --- consumer_api/tests/consumers_view_test.py | 10 +++++++--- consumer_api/tests/sync_view_test.py | 3 +-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/consumer_api/tests/consumers_view_test.py b/consumer_api/tests/consumers_view_test.py index dbb1b3d..82087e9 100644 --- a/consumer_api/tests/consumers_view_test.py +++ b/consumer_api/tests/consumers_view_test.py @@ -1,5 +1,6 @@ +import json +import os import pytest - from flask import current_app @@ -12,6 +13,9 @@ def client(): def test_response_length(client): - r = client.get('/consumers') - + data = { + "uuid": os.environ["LOCAL_UUID"], + "message": "Hello There!" + } + r = client.get('/consumers', data = json.dumps(data)) assert len(r) == 0 diff --git a/consumer_api/tests/sync_view_test.py b/consumer_api/tests/sync_view_test.py index a7839f0..7f9552c 100644 --- a/consumer_api/tests/sync_view_test.py +++ b/consumer_api/tests/sync_view_test.py @@ -22,8 +22,7 @@ def test_log_code_get(client): def test_log_code_post(client): data = { - "uuid": os.environ["LOCAL_UUID"], - "message": "Hello There!" + "uuid": os.environ["LOCAL_UUID"] } r = client.post('/sync', data = json.dumps(data))