tests.py 文件源码

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

项目:2017.2-SiGI-Op_API 作者: fga-gpp-mds 项目源码 文件源码
def test_cable_stretch_view_set(self):
        request = APIRequestFactory().get("")
        cable_stretch_detail = CableStretchListViewSet.as_view(actions={'get':'retrieve'})
        cabletype = CableStretchType.objects.create(description="random")
        cable_stretch_test = CableStretch.objects.create(cod=1,
                                                         length=1,
                                                         manufacturing_year=2012,
                                                         infrastructure="random",
                                                         owner="random",
                                                         fabricant='Potato Bread',
                                                         cable_stretch_type=cabletype,
                                                         access=False,
                                                         creation_date="2017-10-12",
                                                         updated_date="2017-10-12")
        response = cable_stretch_detail(request, pk=cable_stretch_test.pk)
        self.assertEqual(response.status_code, 200)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号