Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from chinapnr/v1.1.16_develop
V1.1.16 develop
- Loading branch information
Showing
6 changed files
with
68 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
python-dateutil | ||
coverage | ||
pytest==4.0.2 | ||
pytest>=4.6.6 | ||
pytest-cov | ||
coveralls | ||
pyyaml | ||
chardet | ||
flask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# coding=utf-8 | ||
# 2019.12.5 v1.1.16 #249 create by Jia ChunYing | ||
from demo.swagger.demo_flask_swagger import app | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def client(): | ||
app.config['TESTING'] = True | ||
|
||
with app.test_client() as client: | ||
yield client | ||
|
||
|
||
# 2019.12.5 v1.1.16 #249 create by Jia ChunYing | ||
@pytest.mark.usefixtures('client') | ||
class TestSwagger(object): | ||
|
||
def test_query(self, client): | ||
response = client.get('/v1/query') | ||
assert b'test_query' in response.data | ||
|
||
def test_add(self, client): | ||
response = client.post('/v1/add') | ||
assert b'test_add' in response.data | ||
|
||
def test_del(self, client): | ||
response = client.delete('/v1/del') | ||
assert b'test_del' in response.data | ||
|
||
def test_update(self, client): | ||
response = client.put('/v1/update') | ||
assert b'test_update' in response.data |