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/' )
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/')
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/')
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/')
def test_constructing_login_url(self): self.assertEquals('http://testserver/api/v1/login/', api._construct_url(api.LOGIN))