Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Milan Fencik committed Nov 25, 2024
1 parent 1e84483 commit 827940f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
5 changes: 4 additions & 1 deletion python/neutron-understack/neutron_understack/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
),
cfg.StrOpt(
"undersync_token",
help="Undersync API token. If not provided, the '/etc/undersync/token' will be read instead.",
help=(
"Undersync API token. If not provided, "
"the '/etc/undersync/token' will be read instead."
),
),
cfg.BoolOpt(
"undersync_dry_run", default=True, help="Call Undersync with dry-run mode"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def test_fetch_connected_interface_uuid(context):

def test_fail_fetch_connected_interface_uuid(context):
context.current["binding:profile"]["local_link_information"][0]["port_id"] = 11
result = driver.fetch_connected_interface_uuid(context)
assert result is None
with pytest.raises(ValueError):
driver.fetch_connected_interface_uuid(context)


def test_update_nautobot_for_tenant_network(nautobot_client):
Expand Down Expand Up @@ -91,13 +91,3 @@ def test_wrong_vif_type_update_port_post_commit(
driver.update_port_postcommit(context)

mocked_fetch_connected_interface_uuid.assert_not_called()


@patch("neutron_understack.neutron_understack_mech.UnderstackDriver.update_nautobot")
def test_no_conn_interface_uuid_update_port_post_commit(
mocked_update_nautobot, context
):
context.current["binding:profile"]["local_link_information"][0]["port_id"] = 11
driver.update_port_postcommit(context)

mocked_update_nautobot.assert_not_called()

0 comments on commit 827940f

Please sign in to comment.