added api tests for de
fixed getMeteoroids call in api
This commit is contained in:
parent
9e89123e92
commit
9b3c8e5b7f
2 changed files with 25 additions and 2 deletions
25
test.py
25
test.py
|
@ -2,8 +2,9 @@
|
|||
import unittest
|
||||
|
||||
import os
|
||||
os.environ["API_URL"] = "http://192.168.0.7:5000/"
|
||||
os.environ["API_URL"] = "http://127.0.0.1:5000/"
|
||||
from compLib.Api import Seeding
|
||||
from compLib.Api import DoubleElim
|
||||
|
||||
|
||||
class TestApiServer(unittest.TestCase):
|
||||
|
@ -34,5 +35,27 @@ class TestApiServer(unittest.TestCase):
|
|||
print(code)
|
||||
|
||||
|
||||
class TestApiServerDoubleElim(unittest.TestCase):
|
||||
def test_all(self):
|
||||
ret, code = DoubleElim.get_goal()
|
||||
print(ret)
|
||||
print(code)
|
||||
ret, code = DoubleElim.get_items()
|
||||
print(ret)
|
||||
print(code)
|
||||
ret, code = DoubleElim.get_scores()
|
||||
print(ret)
|
||||
print(code)
|
||||
ret, code = DoubleElim.get_opponent()
|
||||
print(ret)
|
||||
print(code)
|
||||
ret, code = DoubleElim.get_position()
|
||||
print(ret)
|
||||
print(code)
|
||||
ret, code = DoubleElim.get_meteoroids()
|
||||
print(ret)
|
||||
print(code)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Reference in a new issue