Add test_app.py
This commit is contained in:
parent
d58bde2db5
commit
98054eb342
1 changed files with 13 additions and 0 deletions
13
test_app.py
Normal file
13
test_app.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#test_app.py
|
||||
import pytest
|
||||
from app import app
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
app.testing = True
|
||||
return app.test_client()
|
||||
|
||||
def test_home(client):
|
||||
response = client.get("/")
|
||||
assert response.status_code == 200
|
||||
assert response.data == b"Hello, Jenkins Pipeline with Python!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue