test_rpc.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # -*- coding: utf-8 -*-
00003 
00004 # Copyright 2016 TORK (Tokyo Opensource Robotics Kyokai Association)
00005 #
00006 # Licensed under the Apache License, Version 2.0 (the "License");
00007 # you may not use this file except in compliance with the License.
00008 # You may obtain a copy of the License at
00009 #
00010 #     http://www.apache.org/licenses/LICENSE-2.0
00011 #
00012 # Unless required by applicable law or agreed to in writing, software
00013 # distributed under the License is distributed on an "AS IS" BASIS,
00014 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 # See the License for the specific language governing permissions and
00016 # limitations under the License.
00017 
00018 import unittest
00019 
00020 from geometry_msgs.msg import Pose
00021 import rospy
00022 
00023 from baxter_app_rcp.sample_rpc import SampleRpcBaxter
00024 
00025 PKG = 'baxter_rpc_server'
00026 
00027 
00028 class TestBaxterRpc(unittest.TestCase):
00029 
00030     def setUp(self):
00031         self.sample_rpc = SampleRpcBaxter()
00032 
00033     def tearDown(self):
00034         True
00035 
00036     def test_cartesian_move_left(self):
00037         '''
00038         Test criteria: The ROS Service return bool, and True if the internal
00039                        call finished without issue.
00040         '''
00041         self.assertTrue(self.sample_rpc.sample_cartesian_move('left'))
00042 
00043     def test_cartesian_move_right(self):
00044         '''
00045         Test criteria: The ROS Service return bool, and True if the internal
00046                        call finished without issue.
00047         '''
00048         self.assertTrue(self.sample_rpc.sample_cartesian_move('right'))
00049 
00050 if __name__ == '__main__':
00051     import rostest
00052     rostest.rosrun(PKG, 'test_rpc', TestBaxterRpc) 


baxter_rpc_server
Author(s): TORK , Isaac I. Y. Saito
autogenerated on Thu Jun 6 2019 21:55:39