Skip to content
Snippets Groups Projects
Verified Commit af7e59b5 authored by Karel van Klink's avatar Karel van Klink :smiley_cat:
Browse files

update iptrunk modification unit test

parent 9d42ecd9
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !83. Comments created here will be created in the context of that merge request.
...@@ -95,10 +95,24 @@ def test_iptrunk_modify_trunk_interface_success( ...@@ -95,10 +95,24 @@ def test_iptrunk_modify_trunk_interface_success(
assert subscription.iptrunk.iptrunk_type == new_type assert subscription.iptrunk.iptrunk_type == new_type
assert subscription.iptrunk.iptrunk_speed == new_speed assert subscription.iptrunk.iptrunk_speed == new_speed
assert subscription.iptrunk.iptrunk_minimum_links == new_link_count assert subscription.iptrunk.iptrunk_minimum_links == new_link_count
# FIXME: update assertions below when IPtrunk model is updated assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_geant_a_sid == new_side_a_sid
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_geant_a_sid == new_side_a_sid
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members == new_side_a_ae_members def _find_interface_by_name(interfaces: list[dict[str, str]], name: str):
# assert subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members_description == new_side_a_ae_descriptions for interface in interfaces:
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_geant_a_sid == new_side_b_sid if interface["interface_name"] == name:
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members == new_side_b_ae_members return interface
# assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members_description == new_side_b_ae_descriptions raise IndexError(f"Interface {name} not found!")
for member in subscription.iptrunk.iptrunk_sides[0].iptrunk_side_ae_members:
assert (
member.interface_description
== _find_interface_by_name(new_side_a_ae_members, member.interface_name)["interface_description"]
)
assert subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_geant_a_sid == new_side_b_sid
for member in subscription.iptrunk.iptrunk_sides[1].iptrunk_side_ae_members:
assert (
member.interface_description
== _find_interface_by_name(new_side_b_ae_members, member.interface_name)["interface_description"]
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment