def test_publish_dynamic_video_url_is_null(self): """ 测试请求接口视频为空 :return: """ publish_dynamic_api = PublishDynamicApi(self.anchor_mobile) publish_dynamic_api.get({ 'type': 2, 'image_urls': None, 'video_url': None, 'content': None, 'first_frame': None }) self.assertEqual(publish_dynamic_api.get_code(), 450005) self.assertEqual(publish_dynamic_api.get_response_message(), u'请上传动态中的视频')
def test_publish_dynamic_type_error(self): """ 测试请求接口动态类型错误 :return: """ publish_dynamic_api = PublishDynamicApi(self.anchor_mobile) publish_dynamic_api.get({ 'type': 55, 'image_urls': None, 'video_url': self.video_url, 'content': None, 'first_frame': None }) self.assertEqual(publish_dynamic_api.get_code(), 450001) self.assertEqual(publish_dynamic_api.get_response_message(), u'上传文件类型不能为空')