@conary_test.rpm
    def testRPMCapsuleGhost(self):
        recipestr1 = r"""
class TestGhost(CapsuleRecipe):
    name = 'ghost'
    version = '1.0'
    clearBuildReqs()

    def setup(r):
        r.addCapsule('ghost-1.0-1.i386.rpm')
        # ensure that initialContents overrides transient
        r.Transient('/foo/ghost')
"""
        built, d = self.buildRecipe(recipestr1, "TestGhost")
        client = self.getConaryClient()
        repos = client.getRepos()
        nvf = repos.findTrove(None, built[0])
        trv = repos.getTrove(*nvf[0])
        fileList = list(trv.iterFileList())
        fileObjs = repos.getFileVersions([(x[0], x[2], x[3]) for x in fileList
                                          if x[1] == '/foo/ghost'])
        for fileInfo, fileObj in zip(fileList, fileObjs):
            self.assertFalse(fileObj.flags.isConfig(),
                        "Expected config to be unset for %s" % fileInfo[1])
            self.assertFalse(fileObj.flags.isTransient(),
                        fileInfo[1] % "Expected transient to be unset for %s")
            self.assertTrue(fileObj.flags.isInitialContents(),
                            "Expected initialContents for %s" % fileInfo[1])
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/buildtest/capsulepolicytest.py/RpmCapsuleTest.testRPMCapsuleGhost/swapped operands of `%`