Added the first test case

This commit is contained in:
2020-11-29 03:15:11 +01:00
parent 1dd4e5eff3
commit 44139a4206
4 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import pytest
import app
@pytest.fixture
def client():
app.app.config['TESTING'] = True
with app.app.test_client() as client:
yield client
def test_login_required(client):
r = client.get('/content/caff/1')
assert r.status_code == 302