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

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

src/s/y/synnefo-HEAD/snf-tools/synnefo_tools/burnin/cyclades_common.py   synnefo(Download)
        self.info("Server password: %s", server['adminPass'])
 
        self.assertEqual(server['name'], servername)
        self.assertEqual(server['flavor']['id'], flavor['id'])
        self.assertEqual(server['image']['id'], image['id'])
        self.assertEqual(server['status'], "BUILD")
        if project_id is None:
            project_id = self._get_uuid()
        self.assertEqual(server['tenant_id'], project_id)

src/s/y/synnefo-HEAD/snf-tools/synnefo_tools/burnin/pithos_tests.py   synnefo(Download)
        pithos = self.clients.pithos
        resp = pithos.account_head()
        self.assertEqual(resp.status_code, 204)
        self.info('Returns 204')
 
        resp = pithos.account_head(until='1000000000')
        self.assertEqual(resp.status_code, 204)
        datestring = unicode(resp.headers['x-account-until-timestamp'])
        self.assertEqual(u'Sun, 09 Sep 2001 01:46:40 GMT', datestring)
 
        cnames = [c['name'] for c in resp]
        self.assertEqual(sorted(list(set(cnames))), sorted(cnames))
        self.info('Containers have unique names')
 
        resp = pithos.account_get(limit=1)
        self.assertEqual(len(resp.json), 1)

src/s/y/synnefo-HEAD/snf-tools/synnefo_tools/burnin/images_tests.py   synnefo(Download)
        self.simple_names = names
        detailed_names = sorted([flv['name'] for flv in self.detailed_flavors])
        self.assertEqual(self.simple_names, detailed_names)
 
    def test_004_unique_flavor_names(self):
        """Test flavors have unique names"""
        self.assertEqual(sorted(list(set(self.simple_names))),
            flavor = (flv['vcpus'], flv['ram'], flv['disk'],
                      flv['SNF:disk_template'])
            self.assertEqual("C%dR%dD%d%s" % flavor, flv['name'],
                             "Flavor %s doesn't match its specs" % flv['name'])
 
    def test_002_list_images_detailed(self):
        """Test detailed image list is the same length as simple list"""
        self.detailed_images = self._get_list_of_images(detail=True)
        self.assertEqual(len(self.simple_images), len(self.detailed_images))
 
    def test_003_same_image_names(self):
        """Test detailed and simple image list contain the same names"""
        snames = sorted([i['name'] for i in self.simple_images])
        dnames = sorted([i['name'] for i in self.detailed_images])
        self.assertEqual(snames, dnames)

src/s/y/synnefo-HEAD/snf-tools/synnefo_tools/burnin/astakos_tests.py   synnefo(Download)
        with self.assertRaises(ClientError) as cl_error:
            client.list_servers()
            self.assertEqual(cl_error.exception.status, 401)
 
    def test_002_name2uuid(self):
        self.assertIn(given_name[our_uuid], given_uuid)
 
        self.assertEqual(given_uuid[given_name[our_uuid]], our_uuid)
 
    def test_005_authenticate(self):
        self.assertIn('access', self.details)
        access = self.details['access']
        self.assertEqual(set(('user', 'token', 'serviceCatalog')), set(access))
        self.info('Top-level keys are correct')
        self.assertEqual(self.clients.token, access['token']['id'])
        self.info('Token is correct')
        self.assertEqual(
            set(['roles', 'name', 'id', 'roles_links']),