Ejemplo n.º 1
0
 def test_app_position_update_info_02(self):
     """测试更新real2位置基本信息"""
     result = app_position_update_info(positionId_real2_Gary, positionName,
                                       isDefault)
     sql = "select name from iot_position where position_id='%s';" % positionId_real2_Gary
     position_name_sql = get_result_from_sql(sql)[0]
     self.assertEqual(positionName, position_name_sql)
Ejemplo n.º 2
0
 def test_app_position_update_info_09(self):
     """测试请求参数positionId为空"""
     result = app_position_update_info("",
                                       positionName=None,
                                       isDefault=None)
     self.assertIn('"code":302', result.text)
Ejemplo n.º 3
0
 def test_app_position_update_info_08(self):
     """测试请求参数不传positionName和isDefault"""
     result = app_position_update_info(positionId_real2_Gary,
                                       positionName=None,
                                       isDefault=None)
     self.assertIn('"code":0', result.text)
Ejemplo n.º 4
0
 def test_app_position_update_info_04(self):
     """测试更新的位置错误或不存在"""
     result = app_position_update_info(positionId_wrong, positionName,
                                       isDefault)
     self.assertIn('"code":710', result.text)
Ejemplo n.º 5
0
 def test_app_position_update_info_03(self):
     """测试更新其他用户的位置基本信息"""
     result = app_position_update_info(positionId_Jenny, positionName,
                                       isDefault)
     self.assertIn('"code":710', result.text)