示例#1
0
 def test_position_device_assign_06(self):
     """测试分配自己的设备到其他人位置下"""
     result = position_device_assign(did_Gary_cube, positionId_Jenny, layout)
     self.assertIn('"code":710', result.text)
示例#2
0
 def test_position_device_assign_07(self):
     """测试分配其他人的设备到自己位置下"""
     result = position_device_assign(did_Jenny_hub, positionId_Gary, layout)
     self.assertIn('"code":706', result.text)
示例#3
0
 def test_position_device_assign_05(self):
     """测试分配位置为空"""
     result = position_device_assign(did_Gary_cube, "", layout)
     self.assertIn('"code":302', result.text)
示例#4
0
 def test_position_device_assign_04(self):
     """测试分配设备为空"""
     result = position_device_assign("", positionId_Gary, layout)
     self.assertIn('"code":302', result.text)
示例#5
0
 def test_position_device_assign_03(self):
     """测试分配设备错误不存在"""
     result = position_device_assign(did_wrong, positionId_Gary, layout)
     self.assertIn('"code":706', result.text)
示例#6
0
 def test_position_device_assign_02(self):
     """测试分配位置错误或不存在"""
     result = position_device_assign(did_Gary_cube, positionId_wrong, layout)
     self.assertIn('"code":710', result.text)
示例#7
0
 def test_position_device_assign_01(self):
     """测试为设备分配位置"""
     result = position_device_assign(did_Gary_cube, positionId_Gary, layout)
     self.assertIn('"code":0', result.text)