From 289582b3dcbeb23328325d224c7db7de66a3a55f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 5 Aug 2024 11:56:25 +0200 Subject: Merging upstream version 10.1. Signed-off-by: Daniel Baumann --- tests/topotests/nb_config/test_nb_config.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'tests/topotests/nb_config/test_nb_config.py') diff --git a/tests/topotests/nb_config/test_nb_config.py b/tests/topotests/nb_config/test_nb_config.py index f699a4e..9099ef1 100644 --- a/tests/topotests/nb_config/test_nb_config.py +++ b/tests/topotests/nb_config/test_nb_config.py @@ -24,9 +24,7 @@ CWD = os.path.dirname(os.path.realpath(__file__)) def tgen(request): "Setup/Teardown the environment and provide tgen argument to tests" - topodef = { - "s1": ("r1",) - } + topodef = {"s1": ("r1",)} tgen = Topogen(topodef, request.module.__name__) tgen.start_topology() @@ -46,12 +44,14 @@ def test_access_list_config_ordering(tgen): r1 = tgen.gears["r1"] - output = r1.vtysh_multicmd([ - "conf t", - "access-list test seq 1 permit host 10.0.0.1"]) + output = r1.vtysh_multicmd( + ["conf t", "access-list test seq 1 permit host 10.0.0.1"] + ) output = r1.vtysh_cmd("show ip access-list test json") got = json.loads(output) - expected = json.loads('{"ZEBRA":{"test":{"type":"Standard", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "address":"10.0.0.1", "mask":"0.0.0.0"}]}}}') + expected = json.loads( + '{"zebra":{"test":{"type":"Standard", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "address":"10.0.0.1", "mask":"0.0.0.0"}]}}}' + ) result = json_cmp(got, expected) assert result is None @@ -59,11 +59,11 @@ def test_access_list_config_ordering(tgen): # If the northbound mis-orders the create/delete then this test fails. # https://github.com/FRRouting/frr/pull/15423/commits/38b85e0c2bc555b8827dbd2cb6515b6febf548b4 # - output = r1.vtysh_multicmd([ - "conf t", - "access-list test seq 1 permit 10.0.0.0/8"]) + output = r1.vtysh_multicmd(["conf t", "access-list test seq 1 permit 10.0.0.0/8"]) output = r1.vtysh_cmd("show ip access-list test json") got = json.loads(output) - expected = json.loads('{"ZEBRA":{"test":{"type":"Zebra", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "prefix":"10.0.0.0/8", "exact-match":false}]}}}') + expected = json.loads( + '{"zebra":{"test":{"type":"Zebra", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "prefix":"10.0.0.0/8", "exact-match":false}]}}}' + ) result = json_cmp(got, expected) assert result is None -- cgit v1.2.3