Exemplo n.º 1
0
    def setUpClass(cls):
        super(ImagesFixture, cls).setUpClass()
        cls.resources = ResourcePool()

        cls.user_one = ImagesAuthComposite()
        cls.user_two = ImagesAuthCompositeAltOne()
        cls.user_three = ImagesAuthCompositeAltTwo()

        cls.images = ImagesComposite(cls.user_one)
        cls.images_alt_one = ImagesComposite(cls.user_two)
        cls.images_alt_two = ImagesComposite(cls.user_three)

        cls.addClassCleanup(cls.resources.release)
Exemplo n.º 2
0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

import unittest

from cloudcafe.common.tools.datagen import rand_name
from cloudcafe.glance.common.constants import Messages
from cloudcafe.glance.composite import ImagesComposite, ImagesAuthComposite

from cloudroast.glance.fixtures import ImagesFixture

user_one = ImagesAuthComposite()
images = ImagesComposite(user_one)


@unittest.skipUnless(images.config.allow_post_images
                     and images.config.allow_put_image_file
                     and images.config.allow_get_image_file,
                     'Endpoint has incorrect access')
class GetRegisteredImageFile(ImagesFixture):
    @classmethod
    def setUpClass(cls):
        super(GetRegisteredImageFile, cls).setUpClass()

        member_id = cls.images_alt_one.auth.tenant_id

        # Count set to number of images required for this module