예제 #1
0
 def test_service_subject_query_08(self):
     """测试查询对象subjectId为空"""
     result = service_subject_query("")
     self.assertIn('"code":302', result.text)
예제 #2
0
 def test_service_subject_query_06(self):
     """测试查询对象subjectId错误或不存在"""
     result = service_subject_query(subjectId_wrong)
     self.assertIn('"code":709', result.text)
예제 #3
0
 def test_service_subject_query_07(self):
     """测试查询其他用户对象subjectId拥有的service基本信息"""
     result = service_subject_query(subjectId_Jenny)
     self.assertIn('"code":709', result.text)
예제 #4
0
 def test_service_subject_query_05(self):
     """测试查询多个对象中有其他用户的subjectId"""
     result = service_subject_query(subjectId_Gary + "," + subjectId_Jenny)
     length = len(json.loads(result.text)["result"])
     self.assertEqual(1, length)
예제 #5
0
 def test_service_subject_query_04(self):
     """测试查询多个对象中subjectId都错误或不存在"""
     result = service_subject_query(subjectId_wrong + "," + subjectId_wrong)
     self.assertIn('"code":709', result.text)
예제 #6
0
 def test_service_subject_query_03(self):
     """测试查询多个对象中有subjectId错误或不存在"""
     result = service_subject_query(subjectId_Gary + "," + subjectId_wrong)
     length = len(json.loads(result.text)["result"])
     self.assertEqual(1, length)
예제 #7
0
 def test_service_subject_query_02(self):
     """测试查询多个对象subjectId拥有的service基本信息"""
     result = service_subject_query(subjectId_Gary + "," + subjectId_Gary_cube)
     length = len(json.loads(result.text)["result"])
     self.assertEqual(2, length)
예제 #8
0
 def test_service_subject_query_01(self):
     """测试查询对象subjectId拥有的service基本信息"""
     result = service_subject_query(subjectId_Gary)
     self.assertIn('"code":0', result.text)