tests.py 文件源码

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

项目:mos-horizon 作者: Mirantis 项目源码 文件源码
def test_copy_get(self):
        original_name = u"test folder%\u6346/test.txt"
        copy_name = u"test.copy.txt"
        container = self.containers.first()
        obj = self.objects.get(name=original_name)
        ret = (self.containers.list(), False)
        api.swift.swift_get_containers(IsA(http.HttpRequest)).AndReturn(ret)
        self.mox.ReplayAll()
        copy_url = reverse('horizon:project:containers:object_copy',
                           args=[container.name, obj.name])
        res = self.client.get(copy_url)
        # The copy's name must appear in initial data
        pattern = ('<input id="id_new_object_name" value="%s" '
                   'name="new_object_name" type="text" '
                   'class="form-control" maxlength="255" />' % copy_name)
        self.assertContains(res, pattern, html=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号