mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add campaign support for ferry-only bases.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3170.
This commit is contained in:
30
tests/campaignloader/test_controlpointconfig.py
Normal file
30
tests/campaignloader/test_controlpointconfig.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from game.campaignloader.controlpointconfig import ControlPointConfig
|
||||
|
||||
|
||||
def test_from_empty_data() -> None:
|
||||
config = ControlPointConfig.from_data({})
|
||||
assert not config.ferry_only
|
||||
|
||||
|
||||
def test_from_data() -> None:
|
||||
config = ControlPointConfig.from_data(
|
||||
{
|
||||
"ferry_only": True,
|
||||
}
|
||||
)
|
||||
assert config.ferry_only
|
||||
|
||||
|
||||
def iter_from_data() -> None:
|
||||
data = dict(
|
||||
ControlPointConfig.iter_from_data(
|
||||
{
|
||||
0: {},
|
||||
"named": {"ferry_only": True},
|
||||
}
|
||||
)
|
||||
)
|
||||
assert data == {
|
||||
0: ControlPointConfig(ferry_only=False),
|
||||
"named": ControlPointConfig(ferry_only=True),
|
||||
}
|
||||
Reference in New Issue
Block a user