Module Expr Str ImportFrom alias ImportFrom 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 Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad ListLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr 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 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 NameLoad 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 With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword 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 keyword 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.images.common.types ImageMemberStatus cloudcafe.compute.common.exceptions Forbidden ItemNotFound cloudroast.images.fixtures ImagesFixture ImageMembershipSharingCycleTest N/A ImagesFixture N/A setUpClass N/A N/A cls N/A N/A N/A N/A N/A N/A super ImageMembershipSharingCycleTest 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_membership_sharing_cycle N/A N/A self N/A N/A N/A 
        @summary: Image membership sharing cycle:
        tenant shares to alt_tenant, but alt_tenant cannot share to
        third_tenant.

        1) Given a previously created image, verify that list of image members
        is empty
        2) Verify that alternative tenant cannot access the image
        3) Verify that third tenant cannot access the image
        4) Share image with alternative tenant as tenant
        5) Verify that list of image members contains alternative tenant
        6) Update alternative tenant membership status to 'Accepted'
        7) Share the image with third tenant as alternative tenant
        8) Verify that the response code is 403
        9) Verify that third tenant cannot access the image
        10) Verify that list of image members does not contain third tenant
         N/A members_ids N/A N/A N/A self images_behavior get_member_ids image_id N/A N/A self image id_ N/A N/A N/A self assertEqual members_ids N/A 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 N/A N/A self assertRaises ItemNotFound N/A N/A N/A N/A N/A self third_images_client get_image image_id N/A N/A self image id_ 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 members_ids N/A N/A N/A self images_behavior get_member_ids image_id N/A N/A self image id_ N/A N/A N/A self assertIn N/A self alt_tenant_id members_ids 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 updated_member N/A response entity N/A N/A N/A self assertEqual N/A updated_member member_id N/A self alt_tenant_id N/A N/A N/A self assertEqual N/A updated_member status N/A ImageMemberStatus ACCEPTED N/A N/A N/A self assertRaises Forbidden N/A N/A N/A N/A N/A self alt_images_client add_member image_id N/A N/A self image id_ member_id N/A self third_tenant_id N/A N/A N/A self assertRaises ItemNotFound N/A N/A N/A N/A N/A self third_images_client get_image image_id N/A N/A self image id_ N/A members_ids N/A N/A N/A self images_behavior get_member_ids image_id N/A N/A self image id_ N/A N/A N/A self assertNotIn N/A self third_tenant_id members_ids N/A N/A tags type positive regression true N/A