def setUp(self): super(SystemAPITest, self).setUp() self.mapper = Mapper() self.dispatcher = Dispatcher(self.mapper) self.context = CallContext( user=None, mapper=self.mapper, dispatcher=self.dispatcher) self.system_api = SystemAPI(self.context)
def setUp(self): super(DispatcherTests, self).setUp() self.mapper = Mapper() self.mapper.register(TestAPI, '') self.dispatcher = Dispatcher(self.mapper)
def setUp(self): super(MapperTests, self).setUp() self.mapper = Mapper()
# Copyright (C) 2010, 2011 Linaro Limited # # Author: Zygmunt Krynicki <*****@*****.**> # # This file is part of linaro-django-xmlrpc. # # linaro-django-xmlrpc is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software Foundation # # linaro-django-xmlrpc is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with linaro-django-xmlrpc. If not, see <http://www.gnu.org/licenses/>. """ Global objects """ from linaro_django_xmlrpc.models import Mapper mapper = Mapper() mapper.register_introspection_methods()
`environment`: string The type of test environment the retrieved test definitions should apply to. Return value ------------ This function returns an XML-RPC structure of test definition name and URL where the test definition exists. """ testdefs = {} tds = TestDefinition.objects.all() if os: tds = tds.filter(target_os__contains=os) if device: tds = tds.filter(target_dev_types__contains=device) if environment: tds = tds.filter(environment__contains=environment) for testdef in tds: testdefs[testdef.name] = testdef.url return testdefs # Mapper used by the legacy URL legacy_mapper = Mapper() legacy_mapper.register_introspection_methods() legacy_mapper.register(DashboardAPI, '')
def setUp(self): super().setUp() self.mapper = Mapper() self.mapper.register(TestAPI, "") self.dispatcher = Dispatcher(self.mapper)
def setUp(self): super().setUp() self.mapper = Mapper()