From 25ee6663b8356ad3598005297e57c9c260248d2f Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Fri, 9 Aug 2019 10:40:02 -0400 Subject: [API] Fixed issue when disbanding a fleet from a coast --- .../integration/webdiplomacy_net/tests/test_orders.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'diplomacy/integration/webdiplomacy_net/tests/test_orders.py') diff --git a/diplomacy/integration/webdiplomacy_net/tests/test_orders.py b/diplomacy/integration/webdiplomacy_net/tests/test_orders.py index aed58c6..c2de6e8 100644 --- a/diplomacy/integration/webdiplomacy_net/tests/test_orders.py +++ b/diplomacy/integration/webdiplomacy_net/tests/test_orders.py @@ -308,6 +308,25 @@ def test_disband_fleet_001(): assert order_from_dict.to_string() == order_str assert compare_dicts(order_from_dict.to_dict(), order_dict) +def test_disband_fleet_coast_001(): + """ Tests disband fleet """ + raw_order = 'F SPA/NC D' + order_str = 'F SPA/NC D' + order_dict = {'terrID': 76, + 'unitType': 'Fleet', + 'type': 'Disband', + 'toTerrID': '', + 'fromTerrID': '', + 'viaConvoy': ''} + order_from_string = Order(raw_order, phase_type='R') + order_from_dict = Order(order_dict, phase_type='R') + + # Validating + assert order_from_string.to_string() == order_str + assert compare_dicts(order_from_string.to_dict(), order_dict) + assert order_from_dict.to_string() == order_str + assert compare_dicts(order_from_dict.to_dict(), order_dict) + def test_build_army_001(): """ Tests build army """ raw_order = 'A PAR B' -- cgit v1.2.3