예제 #1
0
 def test_move_wrong_pos(self, mock_requests):
     r = requests.Response()
     r.status_code = 401
     mock_requests.get.return_value = r
     f = FosCam("localhost")
     with self.assertRaisesRegexp(CamException, "Position"):
         f.move(18) 
예제 #2
0
 def test_move_no_password(self, mock_requests):
     r = requests.Response()
     r.status_code = 401
     mock_requests.get.return_value = r
     f = FosCam("localhost")
     with self.assertRaisesRegexp(CamException, "Unauthorized"):
         f.move(1)