Module Expr Str ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Dict Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list Call NameLoad keyword Str keyword Str decorator_list
N/A N/A 
Copyright 2014 Rackspace

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-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.
 cafe.drivers.unittest.decorators tags cloudcafe.compute.common.exceptions BadRequest Forbidden ItemNotFound cloudcafe.images.common.types ImageMemberStatus ImageVisibility cloudroast.images.fixtures ImagesFixture ImageVisibilityLifeCycleTest N/A ImagesFixture N/A setUpClass N/A N/A cls N/A N/A N/A N/A N/A N/A super ImageVisibilityLifeCycleTest cls setUpClass N/A N/A cls image N/A N/A N/A cls images_behavior create_image_via_task N/A classmethod test_image_visibility_life_cycle N/A N/A self N/A N/A N/A 
        @summary: Image Visibility Life Cycle

        1) Given a previously created image, verify that image's visibility is
        private (set by default)
        2) Verify that tenant can get the image
        3) Verify that alternate tenant (a non-member) cannot get the image
        4) List images as alternate tenant
        5) Verify that the returned list of images does not contain image
        6) Add alternate tenant as a member of the image
        7) Verify that alternate tenant now get the image
        8) List images as alternate tenant
        9) Verify that the returned list of images does not contain image
        10) Verify that tenant cannot remove image visibility
        11) Verify that alternate tenant cannot update image's visibility
        12) Update membership of alternate tenant to 'Accepted' for image
        13) Verify that alternate tenant (now a member) can still get the image
        14) List images as alternate tenant
        15) Verify that the returned list of images now contains image
         N/A N/A N/A self assertEqual N/A N/A self image visibility N/A ImageVisibility PRIVATE N/A response N/A N/A N/A self images_client get_image image_id N/A N/A self image id_ N/A N/A N/A self assertEqual N/A response status_code 200 N/A get_image N/A response entity N/A N/A N/A self assertEqual get_image N/A self image N/A N/A N/A self assertRaises ItemNotFound N/A N/A N/A N/A N/A self alt_images_client get_image image_id N/A N/A self image id_ N/A images N/A N/A N/A self alt_images_behavior list_images_pagination N/A N/A N/A self assertNotIn N/A self image images N/A response N/A N/A N/A self images_client add_member image_id N/A N/A self image id_ member_id N/A self alt_tenant_id N/A N/A N/A self assertEqual N/A response status_code 200 N/A member N/A response entity N/A N/A N/A self assertEqual N/A member member_id N/A self alt_tenant_id N/A N/A N/A self assertEqual N/A member status N/A ImageMemberStatus PENDING N/A response N/A N/A N/A self alt_images_client get_image image_id N/A N/A self image id_ N/A N/A N/A self assertEqual N/A response status_code 200 N/A images N/A N/A N/A self alt_images_behavior list_images_pagination N/A N/A N/A self assertNotIn N/A self image images N/A N/A N/A self assertRaises Forbidden N/A N/A N/A N/A N/A self images_client update_image image_id N/A N/A self image id_ remove N/A visibility N/A ImageVisibility PUBLIC N/A N/A N/A self assertRaises Forbidden N/A N/A N/A N/A N/A self alt_images_client update_image image_id N/A N/A self image id_ replace N/A visibility N/A ImageVisibility PUBLIC N/A N/A N/A self assertRaises BadRequest N/A N/A N/A N/A N/A self images_client update_image image_id N/A N/A self image id_ replace N/A visibility INVALID_VISIBILITY N/A response N/A N/A N/A self alt_images_client update_member image_id N/A N/A self image id_ member_id N/A self alt_tenant_id status N/A ImageMemberStatus ACCEPTED N/A N/A N/A self assertEqual N/A response status_code 200 N/A member N/A response entity N/A N/A N/A self assertEqual N/A member member_id N/A self alt_tenant_id N/A N/A N/A self assertEqual N/A member status N/A ImageMemberStatus ACCEPTED N/A response N/A N/A N/A self alt_images_client get_image image_id N/A N/A self image id_ N/A N/A N/A self assertEqual N/A response status_code 200 N/A get_image N/A response entity N/A N/A N/A self assertEqual get_image N/A self image N/A images N/A N/A N/A self alt_images_behavior list_images_pagination N/A N/A N/A self assertIn N/A self image images N/A N/A tags type positive regression true N/A