Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/tools/test_network_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def test_add_port_fixed_ip(self, mock_openstack_connect_network):
new_fixed = list(current.fixed_ips)
new_fixed.append({"subnet_id": "subnet-2", "ip_address": "10.0.1.10"})
res = tools.update_port("port-1", fixed_ips=new_fixed)
assert len(res.fixed_ips or []) == 2
assert len(res.fixed_ips) == 2

def test_remove_port_fixed_ip(self, mock_openstack_connect_network):
mock_conn = mock_openstack_connect_network
Expand Down Expand Up @@ -711,7 +711,7 @@ def test_remove_port_fixed_ip(self, mock_openstack_connect_network):
fi for fi in current.fixed_ips if fi["ip_address"] != "10.0.1.10"
]
res = tools.update_port("port-1", fixed_ips=filtered)
assert len(res.fixed_ips or []) == 1
assert len(res.fixed_ips) == 1

def test_get_and_update_allowed_address_pairs(
self,
Expand Down Expand Up @@ -1289,6 +1289,7 @@ def test_update_reassign_bulk_and_auto_assign_floating_ip(
mock_conn.network.create_ip.side_effect = [f1]
bulk = tools.create_floating_ips_bulk("ext-net", 1)
assert len(bulk) == 1
assert bulk[0].id == f1.id

exists = Mock()
exists.id = "fip-b"
Expand Down