Example #1
0
 def test_constructing_get_service_url(self):
     url = api._construct_url(action=api.GET,
                              service='testservice',
                              plan='testplan',
                              platform='testplatform')
     self.assertEquals(
         url,
         'http://testserver/api/v1/testkey/get/service/testservice-testplan/testplatform/'
     )
Example #2
0
 def test_constructing_list_url(self):
     url = api._construct_url(action=api.LIST, service_id='testid')
     self.assertEquals(url, 'http://testserver/api/v1/testkey/my/services/')
Example #3
0
 def test_constructing_status_url(self):
     url = api._construct_url(action=api.STATUS, service_id='testid')
     self.assertEquals(
         url, 'http://testserver/api/v1/testkey/service/testid/status/')
Example #4
0
 def test_constructing_destroy_service_url(self):
     url = api._construct_url(action=api.DESTROY, service_id='testid')
     self.assertEquals(
         url, 'http://testserver/api/v1/testkey/destroy/service/testid/')
Example #5
0
 def test_constructing_login_url(self):
     self.assertEquals('http://testserver/api/v1/login/',
                       api._construct_url(api.LOGIN))