Ejemplo n.º 1
0
 def setUp(self):
     self.flavor1 = FlavorFactory()
     self.flavor2 = FlavorFactory(deleted=True)
     self.flavor3 = FlavorFactory()
     self.compute_path = get_service_path(cyclades_services,
                                          'compute',
                                          version='v2.0')
Ejemplo n.º 2
0
 def setUp(self):
     self.flavor1 = FlavorFactory()
     self.flavor2 = FlavorFactory(deleted=True)
     self.flavor3 = FlavorFactory()
     self.project1 = 'project1'
     self.project2 = 'project2'
     self.project3 = 'project3'
     self.projects = [self.project1, self.project2]
     self.flavor4 = FlavorFactory(public=False)
     self.flavor5 = FlavorFactory(public=False)
     self.flavor6 = FlavorFactory(public=False)
     self.flavor7 = FlavorFactory(public=False)
     self.flavor8 = FlavorFactory()
     self.flavoraccess1 = FlavorAccessFactory(project=self.project1,
                                              flavor=self.flavor4)
     self.flavoraccess2 = FlavorAccessFactory(project=self.project1,
                                              flavor=self.flavor5)
     self.flavoraccess3 = FlavorAccessFactory(project=self.project2,
                                              flavor=self.flavor6)
     self.flavoraccess4 = FlavorAccessFactory(project=self.project3,
                                              flavor=self.flavor7)
     self.flavoraccess5 = FlavorAccessFactory(project=self.project1,
                                              flavor=self.flavor8)
     self.compute_path = get_service_path(cyclades_services,
                                          'compute',
                                          version='v2.0')
Ejemplo n.º 3
0
 def test_deleted_flavors_details(self):
     """Test that deleted flavors do not appear to flavors detail list"""
     FlavorFactory(deleted=True)
     response = self.myget('flavors/detail')
     self.assertSuccess(response)
     api_flavors = json.loads(response.content)['flavors']
     self.assertEqual(len(api_flavors), 6)