Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 def setUp(self):
     super(DispatcherTests, self).setUp()
     self.mapper = Mapper()
     self.mapper.register(TestAPI, '')
     self.dispatcher = Dispatcher(self.mapper)
Ejemplo n.º 3
0
 def setUp(self):
     super(MapperTests, self).setUp()
     self.mapper = Mapper()
Ejemplo n.º 4
0
# 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()
Ejemplo n.º 5
0
        `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, '')
Ejemplo n.º 6
0
 def setUp(self):
     super().setUp()
     self.mapper = Mapper()
     self.mapper.register(TestAPI, "")
     self.dispatcher = Dispatcher(self.mapper)
Ejemplo n.º 7
0
 def setUp(self):
     super().setUp()
     self.mapper = Mapper()