def test_buildPoShCmdLine(self):
        expected = ["powershell",
                        "-noprofile",
                        "-nologo",
                        "-noninteractive",
                        # PoSh 2.0 lets you specify an ExecutionPolicy
                        # from the cmdline, but 1.0 doesn't.
                        "-executionpolicy", "remotesigned",
                        "-file", executepscommand.getPathToPoShScript(), ]

        actual = executepscommand.buildPoShCmdLine()

        self.assertEquals(expected, actual)
示例#2
0
    def test_buildPoShCmdLine(self):
        expected = [
            "powershell",
            "-noprofile",
            "-nologo",
            "-noninteractive",
            # PoSh 2.0 lets you specify an ExecutionPolicy
            # from the cmdline, but 1.0 doesn't.
            "-executionpolicy",
            "remotesigned",
            "-file",
            executepscommand.getPathToPoShScript(),
        ]

        actual = executepscommand.buildPoShCmdLine()

        self.assertEquals(expected, actual)
示例#3
0
    def test_getPathToPoShScript(self):
        expected = r"XXX\PowershellUtils\psbuff.ps1"
        actual = executepscommand.getPathToPoShScript()

        self.assertEquals(expected, actual)
    def test_getPathToPoShScript(self):
        expected = r"XXX\PowershellUtils\psbuff.ps1"
        actual = executepscommand.getPathToPoShScript()

        self.assertEquals(expected, actual)