Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add unti tests for listForTag wiht marker and limit

  • Loading branch information...
commit 4d8b4b04a46af45df70505594e92f0b432ca22c1 1 parent 1726761
@shawnps shawnps authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 txServiceRegistry/test/test_client.py
View
23 txServiceRegistry/test/test_client.py
@@ -245,3 +245,26 @@ def test_list_events_with_mark_and_limit(self):
def test_list_configuration_with_marker_and_limit(self):
return self._marker_and_limit_assertion('/configuration')
+
+ @mock.patch("txServiceRegistry.client.BaseClient.request")
+ def test_listForTag_with_marker(self, request):
+ self.client.services.listForTag('someTag', marker='someMarker')
+ request.assert_called_with('GET', '/services',
+ options={'tag': 'someTag',
+ 'marker': 'someMarker'})
+
+ @mock.patch("txServiceRegistry.client.BaseClient.request")
+ def test_listForTag_with_limit(self, request):
+ self.client.services.listForTag('someTag', limit=3)
+ request.assert_called_with('GET', '/services',
+ options={'tag': 'someTag',
+ 'limit': 3})
+
+ @mock.patch("txServiceRegistry.client.BaseClient.request")
+ def test_listForTag_with_marker_and_limit(self, request):
+ self.client.services.listForTag('someTag', marker='someMarker',
+ limit=3)
+ request.assert_called_with('GET', '/services',
+ options={'tag': 'someTag',
+ 'marker': 'someMarker',
+ 'limit': 3})
Please sign in to comment.
Something went wrong with that request. Please try again.