def test_ListResources(self, zipped=False):
        """
        Check the list of resources.
        """
        from openflow.dummyom.models import DummyOM
        slice_urn, cred = self.create_ch_slice()
        options = dict(geni_compressed=zipped, geni_available=True)
        rspec = wrap_xmlrpc_call(
            self.am_client.ListResources,
            [cred, options], {}, settings.TIMEOUT)
        
        logger.debug(rspec % "Got Advertisement RSpec: \n%s")
        
        if zipped:
            import zlib, base64
            rspec = zlib.decompress(base64.b64decode(rspec))
        
        # Create switches and links
        self.switches, self.links = parse_rspec(rspec)
        
        # check the number of switches and links
        num_links = sum([len(d.get_switches()) for d in DummyOM.objects.all()])
        self.assertEqual(len(self.switches),
                         num_links)
        self.assertEqual(len(self.links),
                         settings.NUM_LINKS_PER_AGG * settings.NUM_DUMMY_OMS)
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/plugins/openflow/tests/gapi/gapi.py/GAPITests.test_ListResources/swapped operands of `%`