summaryrefslogtreecommitdiff
path: root/tests/topotests/ospf_suppress_fa
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2021-04-08 13:04:26 -0400
committerDonald Sharp <sharpd@nvidia.com>2021-04-09 08:35:05 -0400
commit0b25370e95306a6b1631fea8d521aa6f04e75fe4 (patch)
tree0daabb39ecf1d051a878e8be2153ef816a7959ff /tests/topotests/ospf_suppress_fa
parent98ca91e18193a34791d4693c685b60d57ce56f35 (diff)
tests: More black fixups
Just another round of fixups found by running black on the code Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'tests/topotests/ospf_suppress_fa')
-rw-r--r--tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py b/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
index 74d609c57e..76e50beb5c 100644
--- a/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
+++ b/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
@@ -94,12 +94,14 @@ def setup_module(mod):
tgen.start_router()
+
def teardown_module(_mod):
"Teardown the pytest environment"
tgen = get_topogen()
tgen.stop_topology()
+
def test_converge_protocols():
"Wait for protocol convergence"
@@ -110,19 +112,26 @@ def test_converge_protocols():
topotest.sleep(10, "Waiting for OSPF convergence")
+
def ospf_configure_suppress_fa(router_name, area):
"Configure OSPF suppress-fa in router_name"
tgen = get_topogen()
router = tgen.gears[router_name]
- router.vtysh_cmd("conf t\nrouter ospf\narea {} nssa suppress-fa\nexit\n".format(area))
+ router.vtysh_cmd(
+ "conf t\nrouter ospf\narea {} nssa suppress-fa\nexit\n".format(area)
+ )
+
def ospf_unconfigure_suppress_fa(router_name, area):
"Remove OSPF suppress-fa in router_name"
tgen = get_topogen()
router = tgen.gears[router_name]
- router.vtysh_cmd("conf t\nrouter ospf\nno area {} nssa suppress-fa\nexit\n".format(area))
+ router.vtysh_cmd(
+ "conf t\nrouter ospf\nno area {} nssa suppress-fa\nexit\n".format(area)
+ )
+
def ospf_get_lsa_type5(router_name):
"Return a dict with link state id as key and forwarding addresses as value"
@@ -141,7 +150,8 @@ def ospf_get_lsa_type5(router_name):
result[lsa] = re1.group(1)
return result
-@pytest.fixture(scope='module', name='original')
+
+@pytest.fixture(scope="module", name="original")
def test_ospf_set_suppress_fa():
"Test OSPF area [x] nssa suppress-fa"
@@ -162,6 +172,7 @@ def test_ospf_set_suppress_fa():
# in the test_ospf_unset_supress_fa
return initial
+
def test_ospf_unset_supress_fa(original):
"Test OSPF no area [x] nssa suppress-fa"