tests.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:mos-horizon 作者: Mirantis 项目源码 文件源码
def test_create_container_post(self):
        for container in self.containers.list():
            self.mox.ResetAll()  # mandatory in a for loop
            api.swift.swift_create_container(IsA(http.HttpRequest),
                                             container.name,
                                             metadata=({'is_public': False}))
            self.mox.ReplayAll()

            formData = {'name': container.name,
                        'access': "private",
                        'method': forms.CreateContainer.__name__}
            res = self.client.post(
                reverse('horizon:project:containers:create'), formData)
            args = (utils.wrap_delimiter(container.name),)
            url = reverse('horizon:project:containers:index', args=args)
            self.assertRedirectsNoFollow(res, url)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号