def isInstallProfile(self, line): assert line is not None parser = InstallProfileParser() isValid = parser.isValidLine(line) return isValid
def getCommandFor(self, line): assert line is not None parser = InstallProfileParser() srcPath = parser.parseLine(line) dstPath = self.getDestinationPath(srcPath) cpArgs = CopyArguments() cpArgs.setArguments(srcPath, dstPath) command = CopyCommand(cpArgs) return command
class TestInstallProfile(unittest.TestCase): def setUp(self): self.parser = InstallProfileParser() def test_parse(self): line = "install profile 'Path/To/Profile.mobileprovision'" src = self.parser.parseLine(line) self.assertEqual('Path/To/Profile.mobileprovision', src)
def setUp(self): self.parser = InstallProfileParser()