Main Page
Namespaces
Classes
Files
File List
scripts
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
27
def
test_connect_hub_by_service
(self):
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'
])
test_connect_hub_by_service.TestConnectHubByService
Main.
Definition:
test_connect_hub_by_service.py:22
test_connect_hub_by_service.TestConnectHubByService.setUp
def setUp(self)
Definition:
test_connect_hub_by_service.py:24
test_connect_hub_by_service.TestConnectHubByService.test_connect_hub_by_service
def test_connect_hub_by_service(self)
Definition:
test_connect_hub_by_service.py:27
test_connect_hub_by_service.TestConnectHubByService.tearDown
def tearDown(self)
Definition:
test_connect_hub_by_service.py:37
rocon_gateway_tests
Author(s): Daniel Stonier, Jihoon Lee, Piyush Khandelwal
autogenerated on Mon Jun 10 2019 14:40:15