cutout_view_uint8.py 文件源码

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

项目:boss 作者: jhuapl-boss 项目源码 文件源码
def test_channel_uint8_get_too_big(self):
        """ Test getting a cutout that is over 1GB uncompressed"""
        # Create request
        factory = APIRequestFactory()

        # Create Request to get data you posted
        request = factory.get('/' + version + '/cutout/col1/exp1/channel1/0/0:2048/0:2048/0:131/',
                              accepts='application/blosc')

        # log in user
        force_authenticate(request, user=self.user)

        # Make request
        response = Cutout.as_view()(request, collection='col1', experiment='exp1', channel='channel2',
                                    resolution='0', x_range='0:2048', y_range='0:2048', z_range='0:131', t_range=None)
        self.assertEqual(response.status_code, status.HTTP_413_REQUEST_ENTITY_TOO_LARGE)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号