def test_exception(self, subcommand, expected): with pytest.raises(expected): get_tc_base_command(subcommand)
def test_normal(self, monkeypatch, subcommand, expected): monkeypatch.setattr(tcconfig._common, "find_bin_path", lambda _: "/sbin/tc") assert get_tc_base_command(subcommand) == expected