diff --git a/main/Dockerfiles/app/App/app/test.py b/main/Dockerfiles/app/App/app/test.py index 0548320..dc75e95 100644 --- a/main/Dockerfiles/app/App/app/test.py +++ b/main/Dockerfiles/app/App/app/test.py @@ -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')