-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring the structure of project, and add test using pytest
* README.md; modify the explanation * Refactoring the structure of project * Dockerfile3 * app/__init__.py * app/api_only_flask.py * run.py * common/__init__.py * common/src/__init__.py * app/requirements.txt * Add test using pytest * test/__init__.py * test/test_api_only_flask.py * test/test_app.py * test/pytest.ini
- Loading branch information
morpheus.0
committed
Jul 18, 2017
1 parent
44863bd
commit fa446d2
Showing
12 changed files
with
50 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from flask import Flask | ||
|
||
|
||
app = Flask(__name__) | ||
|
||
|
||
from app import api_only_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
File renamed without changes.
Empty file.
Empty file.
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,5 @@ | ||
from app import app | ||
|
||
if __name__ == '__main__': | ||
# app.run(host='0.0.0.0', port=59459, debug=True) | ||
app.run(host='0.0.0.0', debug=True) |
Empty file.
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,4 @@ | ||
[pytest] | ||
env = | ||
DEBUG=True | ||
LOGGING_CONFIG_FILEPATH=common/config/logging.yaml |
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,13 @@ | ||
import os | ||
import sys | ||
import py.test | ||
|
||
|
||
sys.path.append(os.path.join('.', '..',)) | ||
|
||
|
||
from app import api_only_flask | ||
|
||
|
||
def test_api_root(): | ||
assert api_only_flask.api_root() == 'Welcome' |
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,2 +1,5 @@ | ||
import pytest | ||
|
||
|
||
def test_app(): | ||
assert True |