diff --git a/tests/vlan_test.py b/tests/vlan_test.py index e00d3c40a8..456bb5dd11 100644 --- a/tests/vlan_test.py +++ b/tests/vlan_test.py @@ -630,10 +630,10 @@ def test_config_vlan_del_last_vlan(self): print(result.exit_code) print(result.output) mock_run_command.assert_has_calls([ - mock.call("docker exec -i swss supervisorctl status ndppd", ignore_error=True, return_cmd=True), - mock.call("docker exec -i swss supervisorctl stop ndppd", ignore_error=True, return_cmd=True), - mock.call("docker exec -i swss rm -f /etc/supervisor/conf.d/ndppd.conf", ignore_error=True, return_cmd=True), - mock.call("docker exec -i swss supervisorctl update", return_cmd=True) + mock.call(['docker', 'exec', '-i', 'swss', 'supervisorctl', 'status', 'ndppd'], ignore_error=True, return_cmd=True), + mock.call(['docker', 'exec', '-i', 'swss', 'supervisorctl', 'stop', 'ndppd'], ignore_error=True, return_cmd=True), + mock.call(['docker', 'exec', '-i', 'swss', 'rm', '-f', '/etc/supervisor/conf.d/ndppd.conf'], ignore_error=True, return_cmd=True), + mock.call(['docker', 'exec', '-i', 'swss', 'supervisorctl', 'update'], return_cmd=True) ]) assert result.exit_code == 0