24 lines
366 B
Python
24 lines
366 B
Python
import pytest
|
|
|
|
from flask import current_app
|
|
|
|
|
|
@pytest.fixture
|
|
def client():
|
|
current_app.config['TESTING'] = True
|
|
|
|
with current_app.test_client() as client:
|
|
yield
|
|
|
|
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')
|
|
|
|
assert r.status_code == 204
|
|
|
|
|