post
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Füleki Fábián 2020-05-08 21:08:37 +02:00
parent 9fec4e81cc
commit 2c5444a245

View File

@ -1,3 +1,6 @@
import json
import os
import pytest import pytest
from flask import current_app from flask import current_app
@ -10,14 +13,18 @@ def client():
with current_app.test_client() as client: with current_app.test_client() as client:
yield client yield client
def test_log_code_get(client): def test_log_code_get(client):
r = client.get('/log') r = client.get('/log')
assert r.status_code == 405 assert r.status_code == 405
def test_log_code_post(client): 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 assert r.status_code == 204