@@ -25,11 +25,12 @@ class ConsulTests(unittest.TestCase):
2525 @mock .patch ('consulate.api.Catalog' )
2626 @mock .patch ('consulate.api.KV' )
2727 @mock .patch ('consulate.api.Health' )
28+ @mock .patch ('consulate.api.Coordinate' )
2829 @mock .patch ('consulate.api.ACL' )
2930 @mock .patch ('consulate.api.Event' )
3031 @mock .patch ('consulate.api.Session' )
3132 @mock .patch ('consulate.api.Status' )
32- def setUp (self , status , session , event , acl , health , kv , catalog , agent ,
33+ def setUp (self , status , session , event , acl , health , coordinate , kv , catalog , agent ,
3334 adapter ):
3435 self .host = '127.0.0.1'
3536 self .port = 8500
@@ -43,6 +44,7 @@ def setUp(self, status, session, event, acl, health, kv, catalog, agent,
4344 self .event = event
4445 self .kv = kv
4546 self .health = health
47+ self .coordinate = coordinate
4648 self .session = session
4749 self .status = status
4850
@@ -93,6 +95,11 @@ def test_health_initialization(self):
9395 self .health .called_once_with (self .base_uri , self .adapter , self .dc ,
9496 self .token ))
9597
98+ def test_coordinate_initialization (self ):
99+ self .assertTrue (
100+ self .coordinate .called_once_with (self .base_uri , self .adapter , self .dc ,
101+ self .token ))
102+
96103 def test_session_initialization (self ):
97104 self .assertTrue (
98105 self .session .called_once_with (self .base_uri , self .adapter , self .dc ,
@@ -118,6 +125,9 @@ def test_event_property(self):
118125 def test_health_property (self ):
119126 self .assertEqual (self .consul .health , self .consul ._health )
120127
128+ def test_coordinate_property (self ):
129+ self .assertEqual (self .consul .coordinate , self .consul ._coordinate )
130+
121131 def test_kv_property (self ):
122132 self .assertEqual (self .consul .kv , self .consul ._kv )
123133
0 commit comments