18 行
340 B
Python
18 行
340 B
Python
import unittest
|
|
|
|
class UnitTest(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
import app
|
|
app = app.create_app()
|
|
app.testing = True
|
|
self.app = app.test_client()
|
|
|
|
def test_yolo(self):
|
|
rv = self.app.get('/create/TEST/')
|
|
self.assertEqual(rv.status, '200 OK')
|
|
self.assertEqual(rv.data,b'5')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|