diff --git a/tests/test_compress.py b/tests/test_compress.py index 8d2b51445..0c4a04ebb 100644 --- a/tests/test_compress.py +++ b/tests/test_compress.py @@ -3,9 +3,8 @@ import string import unittest -from compress import get_encode_method, get_decode_method from fairy import FairyBoard -from variants import VARIANTS +from variants import get_server_variant, VARIANTS class EncodeDecodeTestCase(unittest.TestCase): @@ -30,8 +29,9 @@ def test_encode_decode(self): board = FairyBoard(variant, initial_fen=FEN) moves = board.legal_moves() - encode_method = get_encode_method(variant) - decode_method = get_decode_method(variant) + server_variant = get_server_variant(variant, False) + encode_method = server_variant.move_encoding + decode_method = server_variant.move_decoding saved_restored = [*map(decode_method, map(encode_method, moves))] self.assertEqual(saved_restored, moves)