def testPolicy(self):
        def newDo(a, macros):
            msiPath = os.path.join(self.archivePath, 'Setup2.msi')
            a.recipe._addCapsule(msiPath, 'msi', macros % a.package)
            a.recipe.winHelper = source.WindowsHelper()
            a.recipe.winHelper.productName = 'WindowsAppTest'
            a.recipe.winHelper.platform = ''
            a.recipe.winHelper.version = '1.2.3.4'
            a.recipe.winHelper.productCode = 'FIXME'
            a.recipe.winHelper.upgradeCode = 'FIXME'

        self.mock(build.BuildMSI, 'do', newDo)

        built, d = self.buildRecipe(self.test_recipe1, 'WindowsAppTest',
            logBuild=True)

        msis = [ x for x in built if x[0].endswith(':msi') ]
        self.assertEqual(len(msis), 1)

        msi = msis[0]

        repos = self.openRepository()
        spec = repos.findTrove(self.cfg.buildLabel, msi)
        self.assertEqual(len(spec), 1)

        trv = repos.getTrove(*spec[0])

        self.assertEqual(trv.troveInfo.capsule.msi.name(), 'WindowsAppTest')
        self.assertEqual(trv.troveInfo.capsule.msi.platform(), '')
        self.assertEqual(trv.troveInfo.capsule.msi.version(), '1.2.3.4')
        self.assertEqual(trv.troveInfo.capsule.msi.productCode(), 'FIXME')
        self.assertEqual(trv.troveInfo.capsule.msi.upgradeCode(), 'FIXME')
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/buildtest/windowsactiontest.py/WindowsActionTest.testPolicy/swapped operands of `%`