test_connect_hub_by_service.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 #
3 # License: BSD
4 # https://raw.github.com/robotics-in-concert/rocon_multimaster/hydro-devel/rocon_gateway_tests/LICENSE
5 #
6 ##############################################################################
7 # Imports
8 ##############################################################################
9 
10 import sys
11 import rospy
12 import rocon_console.console as console
13 from rocon_gateway import samples
14 import gateway_msgs.msg as gateway_msgs
15 import unittest
16 import rosunit
17 
18 ##############################################################################
19 # Main
20 ##############################################################################
21 
22 class TestConnectHubByService(unittest.TestCase):
23 
24  def setUp(self):
25  rospy.init_node('test_connect_hub_by_service')
26 
28  print("\n********************************************************************")
29  print("* Sending Connect Hub Request")
30  print("********************************************************************")
31  print("Some time for everything to fire up (gateway, hub)")
32  rospy.sleep(3.0)
33  print("Requesting connection to hub")
34  result, unused_error_message = samples.connect_hub_by_service(raise_exception=False)
35  self.assertEquals(gateway_msgs.ErrorCodes.SUCCESS, result)
36 
37  def tearDown(self):
38  pass
39 
40 NAME = 'test_connect_hub_by_service'
41 if __name__ == '__main__':
42  rosunit.unitrun('test_connect_hub_by_service', NAME, TestConnectHubByService, sys.argv, coverage_packages=['rocon_gateway'])


rocon_gateway_tests
Author(s): Daniel Stonier, Jihoon Lee, Piyush Khandelwal
autogenerated on Mon Jun 10 2019 14:40:15