def test_vpsas_empty_list(self): httpretty.register_uri(httpretty.GET, '%s/api/vpsas.json' % rest_service_url, body='{ "error": "vpsa not found" }') response = VpsaEndpoint.vpsas(self.c) response.should.be.empty
def test_vpsas_empty_list(self): httpretty.register_uri( httpretty.GET, "%s/api/vpsas.json" % rest_service_url, body='{ "error": "vpsa not found" }' ) response = VpsaEndpoint.vpsas(self.c) response.should.be.empty
def test_vpsas_list(self): httpretty.register_uri(httpretty.GET, '%s/api/vpsas.json' % rest_service_url, body=get_json_vpsa_list_response(3)) response = VpsaEndpoint.vpsas(self.c) len(response).should.be.equal(3) response[2].keys().should.contain('name') response[2]['name'].should_not.be.different_of('this_vpsa_2')
def test_vpsas_list(self): httpretty.register_uri( httpretty.GET, "%s/api/vpsas.json" % rest_service_url, body=get_json_vpsa_list_response(3) ) response = VpsaEndpoint.vpsas(self.c) len(response).should.be.equal(3) response[2].keys().should.contain("name") response[2]["name"].should_not.be.different_of("this_vpsa_2")