This commit is contained in:
parent
9fec4e81cc
commit
2c5444a245
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user