def assert_swift_container_provisioned(self, instance):
        """
        Verify the Swift container for the instance has been provisioned successfully.
        """
        if not instance.storage_type == instance.SWIFT_STORAGE:
            return

        stat_result = stat_container(instance.swift_container_name)
        self.assertEqual(stat_result.read_acl, '.r:*')
 def test_stat_container(self, auth, container_name, size, read_acl):
     """Test for stat_container function. """
     self.service.stat.return_value = self.stat_container_response(
         container_name=container_name, size=size, read_acl=read_acl)
     actual_stat_response = openstack_utils.stat_container(
         container_name, **auth)
     self.service.stat.assert_called_once_with(container_name)
     self.assertEqual(read_acl, actual_stat_response.read_acl)
     self.assertEqual(size, actual_stat_response.bytes)
     self.basic_checks(auth)