Example #1
0
 def test_ifttt_scene_delete_position_11(self):
     """测试删除多个位置自动化和场景执行日志"""
     result = ifttt_scene_delete_position(positionId_real1_Gary + "," +
                                          positionId_real2_Gary,
                                          deleteLabel="both")
     self.assertIn('"code":0', result.text)
Example #2
0
 def test_ifttt_scene_delete_position_08(self):
     """测试删除单个位置自动化执行日志"""
     result = ifttt_scene_delete_position(positionId_real1_Gary,
                                          deleteLabel="ifttt")
     self.assertIn('"code":0', result.text)
Example #3
0
 def test_ifttt_scene_delete_position_07(self):
     """测试deleteLabel为空"""
     result = ifttt_scene_delete_position(positionId_real1_Gary, "")
     self.assertIn('"code":302', result.text)
Example #4
0
 def test_ifttt_scene_delete_position_06(self):
     """测试位置id为空"""
     result = ifttt_scene_delete_position("", deleteLabel)
     self.assertIn('"code":302', result.text)
Example #5
0
 def test_ifttt_scene_delete_position_05(self):
     """测试删除单个位置场景执行日志-位置id错误"""
     result = ifttt_scene_delete_position(positionId_wrong, deleteLabel)
     self.assertIn('"code":710', result.text)
Example #6
0
 def test_ifttt_scene_delete_position_04(self):
     """测试删除多个位置场景执行日志中多个位置id错误或不存在"""
     result = ifttt_scene_delete_position(
         positionId_real1_Jenny + "," + positionId_wrong, deleteLabel)
     self.assertIn('"code":710', result.text)