示例#1
0
 def test_exception(self, subcommand, expected):
     with pytest.raises(expected):
         get_tc_base_command(subcommand)
示例#2
0
    def test_normal(self, monkeypatch, subcommand, expected):
        monkeypatch.setattr(tcconfig._common, "find_bin_path", lambda _: "/sbin/tc")

        assert get_tc_base_command(subcommand) == expected