def testCreateChangesetViaHTTPProxy(self):
        # CNY-2058, CNY-2056
        self.openRepository()

        # first add test:runtime to the repository (not via HTTP proxy)
        ver = '/localhost@rpl:linux/1.0-1-1'
        self.addQuickTestComponent('test:runtime', ver)
        flavor = deps.parseFlavor('')
        version = versions.VersionFromString(ver)
        csfile = os.path.join(self.workDir, 'foo.ccs')

        # now switch to using a HTTP proxy
        h = rephelp.HTTPProxy(os.path.join(self.workDir, "http-cache"))
        proxyUri = h.start()
        if proxyUri is None:
            raise testhelp.SkipTestException('Squid is not installed')
        proxyUrl = "http://" + proxyUri
        proxies = dict(http = proxyUrl, https = proxyUrl)

        # switch client config to talk to the proxy
        self.cfg.configLine(h.port % 'proxy http://localhost:%s')
        client = conaryclient.ConaryClient(self.cfg)
        repos = client.getRepos()

        # create the changeset and verify
        repos.createChangeSetFile(
            [('test:runtime', (None, flavor), (version, flavor), True)], csfile,
            primaryTroveList = [('test:runtime', version, flavor)])
        cs = changeset.ChangeSetFromFile(csfile)
        assert(cs.getPrimaryTroveList() == [('test:runtime', version, flavor)])
dataset/ETHPy150Open sassoftware/conary/conary_test/repositorytest/netclienttest.py/NetclientTest.testCreateChangesetViaHTTPProxy/swapped operands of `%`