예제 #1
0
 def test_position_service_query_07(self):
     """测试请求参数不传startIndex"""
     result = position_service_query(positionId_Gary,
                                     serviceTypes,
                                     size,
                                     startIndex=None,
                                     subjectModels=subjectModels,
                                     labels=None,
                                     access=access)
     self.assertIn('"code":0', result.text)
예제 #2
0
 def test_position_service_query_04(self):
     """测试请求参数size为0"""
     result = position_service_query(positionId_Gary,
                                     serviceTypes,
                                     size=0,
                                     startIndex=startIndex,
                                     subjectModels=subjectModels,
                                     labels=None,
                                     access=access)
     self.assertIn('"code":302', result.text)
예제 #3
0
 def test_position_service_query_03(self):
     """测试查询其他用户下位置"""
     result = position_service_query(positionId_Jenny,
                                     serviceTypes,
                                     size,
                                     startIndex,
                                     subjectModels,
                                     labels=None,
                                     access=access)
     self.assertIn('"code":710', result.text)
예제 #4
0
 def test_position_service_query_02(self):
     """测试查询位置错误或不存在"""
     result = position_service_query(positionId_wrong,
                                     serviceTypes,
                                     size,
                                     startIndex,
                                     subjectModels,
                                     labels=None,
                                     access=access)
     self.assertIn('"code":710', result.text)
예제 #5
0
 def test_position_service_query_01(self):
     """测试查询用户自己的家下面的service"""
     result = position_service_query(positionId_Gary,
                                     serviceTypes,
                                     size,
                                     startIndex,
                                     subjectModels,
                                     labels=None,
                                     access=access)
     self.assertIn('"code":0', result.text)
예제 #6
0
 def test_position_service_query_11(self):
     """测试请求参数只传positionId"""
     result = position_service_query(positionId_Gary,
                                     serviceTypes=None,
                                     size=None,
                                     startIndex=None,
                                     subjectModels=None,
                                     labels=None,
                                     access=None)
     self.assertIn('"code":0', result.text)