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)
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)