Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(59)  |  Call(59)  |  Derive(0)  |  Import(0)

src/s/y/synnefo-HEAD/snf-tools/synnefo_tools/burnin/pithos_tests.py   synnefo(Download)
        datestring = unicode(resp.headers['x-account-until-timestamp'])
        self.assertEqual(u'Sun, 09 Sep 2001 01:46:40 GMT', datestring)
        self.assertTrue(any([
            h.startswith('x-account-policy-quota') for h in resp.headers]))
        self.info('Until and account policy quota exist')
        resp = pithos.list_containers()
        full_len = len(resp)
        self.assertTrue(full_len > 2)
        self.info('Normal use is OK')
 
        conames = [container['name'] for container in resp.json if (
            container['name'].lower().startswith('cont'))]
        self.assertTrue(cont1['name'] in conames)
        self.assertFalse(cont3['name'] in conames)
        self.info('Marker-limit combination works')
 
        resp = pithos.account_get(show_only_shared=True)
        self.assertTrue(cont_name in [c['name'] for c in resp.json])
 
        resp = pithos.account_get(until=1342609206.0)
        self.assertTrue(len(resp.json) <= full_len)
        self.info('Until works')
 

src/s/y/synnefo-HEAD/snf-tools/synnefo_tools/burnin/images_tests.py   synnefo(Download)
    def test_006_image_metadata(self):
        """Test every system image has specific metadata defined"""
        keys = frozenset(["osfamily", "root_partition"])
        for i in self.system_images:
            self.assertTrue(keys.issubset(i['properties'].keys()))