Compare commits
9 commits
Author | SHA1 | Date | |
---|---|---|---|
1911a4f913 | |||
7726bdc2ab | |||
fd6fe7d852 | |||
be70fea80e | |||
0c901901fc | |||
e713f2e72e | |||
b6bd2a595d | |||
2648634b7b | |||
23779029ba |
6 changed files with 109 additions and 0 deletions
0
YOLO/Dockerfiles/app/app/images/TEST.png
Executable file → Normal file
0
YOLO/Dockerfiles/app/app/images/TEST.png
Executable file → Normal file
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
18
YOLO/Dockerfiles/app/app/test.py
Normal file
18
YOLO/Dockerfiles/app/app/test.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
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()
|
28
bdd/Dockerfiles/app/app/test.py
Normal file
28
bdd/Dockerfiles/app/app/test.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
import unittest,json
|
||||
|
||||
class UnitTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
import app
|
||||
app = app.create_app()
|
||||
app.testing = True
|
||||
self.app = app.test_client()
|
||||
|
||||
def test_create(self):
|
||||
rv = self.app.get('/create/TEST/')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
self.assertEqual(rv.data,b'1')
|
||||
|
||||
def test_question(self):
|
||||
rv = self.app.get('/question/1/')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
self.assertEqual(rv.data,b'{"attribut": "Smiling", "intitule": "Is the person smiling?", "response": "Yes;No"}')
|
||||
|
||||
def test_update(self):
|
||||
rv = self.app.get('/update/TEST/Smiling/1/')
|
||||
self.assertEqual(rv.status,'200 OK')
|
||||
n = json.loads(rv.data)['Nb']
|
||||
self.assertEqual(n,19)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
16
grid-generation/Dockerfiles/app/app/test.py
Normal file
16
grid-generation/Dockerfiles/app/app/test.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
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_c(self):
|
||||
rv = self.app.get('/')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
30
main/Dockerfiles/app/App/app/test.py
Normal file
30
main/Dockerfiles/app/App/app/test.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
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_homepage(self):
|
||||
rv = self.app.get('/')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
|
||||
def test_play(self):
|
||||
NB_QUESTION = 9
|
||||
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')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
|
||||
def test_lost(self):
|
||||
rv = self.app.get('/lost/TEST')
|
||||
self.assertEqual(rv.status,'200 OK')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
17
update/Dockerfiles/app/app/test.py
Normal file
17
update/Dockerfiles/app/app/test.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
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_create(self):
|
||||
rv = self.app.get('/update/TEST/bald/1/')
|
||||
self.assertEqual(rv.status, '200 OK')
|
||||
self.assertEqual(rv.data,b'12')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Loading…
Reference in a new issue