Skip to content

Commit

Permalink
Create test_web.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH committed May 11, 2024
1 parent 77f3027 commit 4eb125a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions web/tests/test_web.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# web/tests/test_web.py
import pytest
from app import app

@pytest.fixture
def client():
app.config['TESTING'] = True
with app.test_client() as client:
yield client

def test_index(client):
response = client.get('/')
assert response.status_code == 200

0 comments on commit 4eb125a

Please sign in to comment.