feat(web): add web control client
This commit is contained in:
@@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from texas_holdem_replay.server import build_game_url
|
||||
from texas_holdem_replay.server import build_core_url, build_game_url
|
||||
|
||||
|
||||
class ReplayServerTests(unittest.TestCase):
|
||||
@@ -22,7 +22,12 @@ class ReplayServerTests(unittest.TestCase):
|
||||
with self.assertRaises(ValueError):
|
||||
build_game_url({"url": ["file:///tmp/game.json"]})
|
||||
|
||||
def test_build_core_url_preserves_base_path(self) -> None:
|
||||
self.assertEqual(
|
||||
build_core_url("http://127.0.0.1:8000/api/", "/games/demo/hands/run"),
|
||||
"http://127.0.0.1:8000/api/games/demo/hands/run",
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user