Skip to content

Commit

Permalink
Update EapiConnection send unit test to verify /command-api http endp…
Browse files Browse the repository at this point in the history
…oint is used.
  • Loading branch information
mharista committed Jul 21, 2017
1 parent 7351238 commit d8b5756
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/unit/test_eapilib.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def test_send(self):
instance = pyeapi.eapilib.EapiConnection()
instance.transport = mock_transport
instance.send('test')

# HTTP requests to be processed by EAPI should always go to
# the /command-api endpoint regardless of using TCP/IP or unix-socket
# for the transport. Unix-socket implementation maps localhost to the
# unix-socket - /var/run/command-api.sock
mock_transport.putrequest.assert_called_once_with('POST',
'/command-api')
self.assertTrue(mock_transport.close.called)

def test_send_with_authentication(self):
Expand Down

0 comments on commit d8b5756

Please sign in to comment.