From 9b948271e1cf9206c933a5da7c4a5749289ae640 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:57:12 +0900 Subject: [PATCH] chore: add test --- tests/test_row_marshalling.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/test_row_marshalling.py diff --git a/tests/test_row_marshalling.py b/tests/test_row_marshalling.py new file mode 100644 index 0000000..7e59080 --- /dev/null +++ b/tests/test_row_marshalling.py @@ -0,0 +1,26 @@ +from dzgui.model.model_factory import ModelFactory +from dzgui.model.proxy_model import ServerRow + + +def test_row_conversion() -> None: + """Converted FastInsertListStore is expected to have identical elements""" + data = [ + "Test Server", + "chernarusplus", + "1PP", + "05:00", + 10, + 10, + 0, + "127.0.0.0:27016", + 27017, + 99, + "Unofficial", + False, + ] + rows = [ServerRow(*data)] + marshalled = ServerRow.marshal_rows(rows) + store = ModelFactory().make_server_store() + store.extend(marshalled) + converted = [[el for el in row] for row in store] + assert data == converted[0]