コード例 #1
0
 def test_res_write_05(self):
     """测试设备资源列表为空"""
     result = res_write(subjectId_Gary, {})
     self.assertIn('"code":302', result.text)
コード例 #2
0
 def test_res_write_04(self):
     """测试设备id为空"""
     result = res_write("", data)
     self.assertIn('"code":302', result.text)
コード例 #3
0
 def test_res_write_02(self):
     """测试id错误或不存在"""
     result = res_write(subjectId_wrong, data)
     self.assertIn('"code":755', result.text)
コード例 #4
0
 def test_res_write_03(self):
     """测试查询其他人的设备id"""
     result = res_write(subjectId_Jenny, data)
     self.assertIn('"code":755', result.text)
コード例 #5
0
 def test_res_write_01(self):
     """测试提交控制指令(网关开灯,亮度25)"""
     result = res_write(subjectId_Gary, data)
     self.assertIn('"code":0', result.text)