File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -249,7 +249,8 @@ def test_del_handler(mocked_log_info):
249249def test_del_handler_dynamic_template_exists (mocked_log_info ):
250250 for constant in load_constant_files ():
251251 m = constructor (constant , peer_type = "dynamic" )
252- mocked_log_info .assert_called_with ("Using delete template found at %s" % "bgpd/templates/dynamic/delete.conf.j2" )
252+ if os .path .exists (TEMPLATE_PATH + "/bgpd/templates/dynamic/delete.conf.j2" ):
253+ mocked_log_info .assert_called_with ("Using delete template found at %s" % "bgpd/templates/dynamic/delete.conf.j2" )
253254 m .del_handler ("10.10.10.1" )
254255 mocked_log_info .assert_called_with ("Peer '(default|10.10.10.1)' has been removed" )
255256
@@ -265,6 +266,7 @@ def test_del_handler_nonexist_peer(mocked_log_warn):
265266def test_del_handler_dynamic_nonexist_peer_template_exists (mocked_log_warn , mocked_log_info ):
266267 for constant in load_constant_files ():
267268 m = constructor (constant , peer_type = "dynamic" )
268- mocked_log_info .assert_called_with ("Using delete template found at %s" % "bgpd/templates/dynamic/delete.conf.j2" )
269+ if os .path .exists (TEMPLATE_PATH + "/bgpd/templates/dynamic/delete.conf.j2" ):
270+ mocked_log_info .assert_called_with ("Using delete template found at %s" % "bgpd/templates/dynamic/delete.conf.j2" )
269271 m .del_handler ("40.40.40.1" )
270272 mocked_log_warn .assert_called_with ("Peer '(default|40.40.40.1)' has not been found" )
You can’t perform that action at this time.
0 commit comments