diff --git a/compLib/Api.py b/compLib/Api.py index 01b2326..6776af0 100644 --- a/compLib/Api.py +++ b/compLib/Api.py @@ -20,7 +20,7 @@ API_URL_GET_OP = API_URL + "getOp" API_URL_GET_GOAL = API_URL + "getGoal" API_URL_GET_ITEMS = API_URL + "getItems" API_URL_GET_SCORES = API_URL + "getScores" -API_URL_GET_METEOROID = API_URL + "getMeteoroid" +API_URL_GET_METEOROID = API_URL + "getMeteoroids" class Seeding: diff --git a/test.py b/test.py index f6451ca..52d6fa3 100644 --- a/test.py +++ b/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()