mirror of
https://github.com/aclist/dztui.git
synced 2026-11-11 20:40:38 +01:00
Merge branch 'dzgui7' into fix/legacy-version-file
Mirror to Codeberg / mirror-to-codeberg (push) Waiting to run
Mirror to Codeberg / mirror-to-codeberg (push) Waiting to run
This commit is contained in:
101 files changed
+1039
-845
No files matched your search
@@ -6,7 +6,7 @@ from dzgui.views.dialogs.servers import ServerDetailsDialog
|
||||
import gi
|
||||
|
||||
gi.require_version("Gtk", "3.0")
|
||||
from gi.repository import Gtk # noqa E402
|
||||
from gi.repository import Gtk
|
||||
|
||||
|
||||
class MockController:
|
||||
|
||||
@@ -16,7 +16,7 @@ from dzgui.api.steam import is_dayz_downloading
|
||||
(["state_221100_1111"], False),
|
||||
],
|
||||
)
|
||||
def test_dayz_patch_pending(monkeypatch, file_list, expect) -> None:
|
||||
def test_dayz_patch_pending(monkeypatch, file_list: list[str], expect: bool) -> None:
|
||||
def mock_get_pending_downloads(steam_path: Path, appid: int) -> None:
|
||||
files = [Path(file) for file in file_list]
|
||||
return files
|
||||
|
||||
@@ -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]
|
||||
Reference in new issue
Block a user