feature/kjug
added build stephb
This commit is contained in:
parent
0267d9af1a
commit
83a400beba
2 changed files with 25 additions and 0 deletions
15
sources/test_webapp.py
Normal file
15
sources/test_webapp.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
from webapp import app
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
class BasicTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_index(self):
|
||||||
|
tester = app.test_client(self)
|
||||||
|
response = tester.get('/', content_type='html/text')
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertEqual(response.data, b'Hello, World!')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
10
sources/webapp.py
Normal file
10
sources/webapp.py
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
from flask import Flask
|
||||||
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def hello():
|
||||||
|
return "Hello, World!"
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app.run()
|
Loading…
Reference in a new issue