diff options
author | Philip Paquette <pcpaquette@gmail.com> | 2019-08-21 20:13:13 -0400 |
---|---|---|
committer | Philip Paquette <pcpaquette@gmail.com> | 2019-08-21 20:45:22 -0400 |
commit | 63e79a4e0e1db39bb54af22c849756d7fd7b9f57 (patch) | |
tree | 29c587ab2125bf78fcff54e1bb34a78f96890d50 /diplomacy/integration/webdiplomacy_net/tests | |
parent | 22ae5e3672ff630e6db5159591e880b4ba1292cd (diff) |
[API] Converting '-' to 'R' during retreats phase
Diffstat (limited to 'diplomacy/integration/webdiplomacy_net/tests')
-rw-r--r-- | diplomacy/integration/webdiplomacy_net/tests/test_orders.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/diplomacy/integration/webdiplomacy_net/tests/test_orders.py b/diplomacy/integration/webdiplomacy_net/tests/test_orders.py index 71e055e..5429c67 100644 --- a/diplomacy/integration/webdiplomacy_net/tests/test_orders.py +++ b/diplomacy/integration/webdiplomacy_net/tests/test_orders.py @@ -251,6 +251,25 @@ def test_retreat_army_001(): assert order_from_dict.to_string() == order_str assert compare_dicts(order_from_dict.to_dict(), order_dict) +def test_retreat_army_002(): + """ Tests retreat army """ + raw_order = 'A PAR - LON' + order_str = 'A PAR R LON' + order_dict = {'terrID': 47, + 'unitType': 'Army', + 'type': 'Retreat', + 'toTerrID': 6, + '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_retreat_fleet_001(): """ Tests retreat fleet """ raw_order = 'F BRE R SPA/SC' |