main
This commit is contained in:
parent
be70fea80e
commit
fd6fe7d852
1 changed files with 6 additions and 3 deletions
|
@ -1,8 +1,10 @@
|
|||
import unittest
|
||||
|
||||
class UnitTest(unittest.TestCase):
|
||||
NB_QUESTION = 9
|
||||
def setUp(self):
|
||||
from app import app
|
||||
import app
|
||||
app = app.create_app()
|
||||
app.testing = True
|
||||
self.app = app.test_client()
|
||||
|
||||
|
@ -11,8 +13,9 @@ class UnitTest(unittest.TestCase):
|
|||
self.assertEqual(rv.status, '200 OK')
|
||||
|
||||
def test_play(self):
|
||||
rv = self.app.get('/play/TEST')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
for q in range(NB_QUESTION) :
|
||||
rv = self.app.get('/play/TEST/'+str(q))
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
|
||||
def test_end(self):
|
||||
rv = self.app.get('/end/TEST')
|
||||
|
|
Laden…
Reference in a new issue