[Zope-Checkins] CVS: Zope3/lib/python/Zope/I18n/tests - de-default.mo:1.1 de-default.po:1.1 en-default.mo:1.1 en-default.po:1.1 testDirectives.py:1.1 testGettextMessageCatalog.py:1.1 testGlobalTranslationService.py:1.1 testIMessageCatalog.py:1.1 testITranslationService.py:1.2 testSimpleTranslationService.py:1.1 testMessageCatalog.py:1.3 testTranslationService.py:1.4

Stephan Richter srichter@cbu.edu
Wed, 12 Jun 2002 14:38:59 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/I18n/tests
In directory cvs.zope.org:/tmp/cvs-serv9092/I18n/tests

Modified Files:
	testMessageCatalog.py testTranslationService.py 
Added Files:
	de-default.mo de-default.po en-default.mo en-default.po 
	testDirectives.py testGettextMessageCatalog.py 
	testGlobalTranslationService.py testIMessageCatalog.py 
	testITranslationService.py testSimpleTranslationService.py 
Log Message:
I finally got around to finish some priliminary Translation Support. This
complements the work done recently by Barry and Fred concerning the PT i18n
namespace. 

SimpleTranslationService: The possibly simplest implementation of a 
  Translation service. It does not do much, but provides a nice base class
  for other translation services and is great for testing. This 
  implementation does not use message catalog for its storage.

TranslationService: This is a local, persistent flavour of the translation
  service. It is used for TTW development. A first GUI for adding and 
  editing (delete does not work yet) messages is also there already. People
  which use ZBabel will find the interface very familiar. 
  This class also implements many, many methods required for the editing via 
  the browser. These methods will be probably split up into a separate 
  interface called IEditableTranslationService.

GlobalTranslationService: This is a placeless version of the translation
  service. It will be used to register translations via the file system and
  ZCML. As default the GettextMessageCatalog is used, whcih reads in 
  gettext files.


MessageCatalog: A persistent implementation to accomedate the 
  TranslationService. It also implements a couple additional methods to
  support updating and deleting of messages.

GettextMessageCatalog: Every catalog basically represents one gettext
  (*.mo) file. This message catalog cannot be altered, as the file is used
  read only. This message catalog is primarily used in combination with 
  GlobalTranslationService.


Domain: This is basically a shortcut object, so that you do not have to 
  specify the domain for a translation every single time. However, I think
  this obejct is not quiet ready yet, as I do not have the use cases on how
  to handle the placefulness well yet.

Negotiator: The language negotiator helps the translation service to 
  determine the target language in case it was not explicitly passed as an
  argument.

gts ZCML namespace: Using the registerTranslations directive you can 
  specify a gettext directory as the source for additional translations.
  These translation will be added to the GlobalTranslationService, where 
  they will be available for usage. Note that the path of the various
  gettext files identify the language and domain unambiguously.


=== Added File Zope3/lib/python/Zope/I18n/tests/de-default.mo ===
  <Binary-ish file>

=== Added File Zope3/lib/python/Zope/I18n/tests/de-default.po ===
msgid "short_greeting"
msgstr "Hallo!"

msgid "greeting"
msgstr "Hallo $name, wie geht es Dir?"


=== Added File Zope3/lib/python/Zope/I18n/tests/en-default.mo ===
  <Binary-ish file>

=== Added File Zope3/lib/python/Zope/I18n/tests/en-default.po ===
msgid "short_greeting"
msgstr "Hello!"

msgid "greeting"
msgstr "Hello $name, how are you?"


=== Added File Zope3/lib/python/Zope/I18n/tests/testDirectives.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""Test the gts ZCML namespace directives.

$Id: testDirectives.py,v 1.1 2002/06/12 18:38:58 srichter Exp $
"""
import unittest
import sys
import os
from cStringIO import StringIO

from Zope.Configuration.xmlconfig import xmlconfig, Context
from Zope.Configuration.Exceptions import ConfigurationError
from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup


import Zope.I18n
defs_path = os.path.join(os.path.split(Zope.I18n.__file__)[0],
                         'i18n-meta.zcml')

template = """<zopeConfigure
   xmlns='http://namespaces.zope.org/zope'
   xmlns:gts='http://namespaces.zope.org/gts'>
   xmlns:test='http://www.zope.org/NS/Zope3/test'>
   %s
   </zopeConfigure>"""


class DirectivesTest(PlacelessSetup, unittest.TestCase):

    # XXX: tests for other directives needed

    def setUp(self):
        PlacelessSetup.setUp(self)
        xmlconfig(open(defs_path))


    def testRegisterTranslations(self):
        from Zope.I18n.GlobalTranslationService import translationService 
             
        self.assertEqual(translationService._catalogs, {})

        from Zope.I18n import tests
        xmlconfig(StringIO(template % (
            '''
            <gts:registerTranslations directory="./locale" />
            '''
            )), None, Context([], tests)) 

        path = os.path.join(Context([], tests).path(), 'locale', 'en',
                            'LC_MESSAGES', 'Zope-I18n.mo')
        self.assertEqual(translationService._catalogs,
                         {('en', 'Zope-I18n'): [unicode(path)]})


def test_suite():
    loader=unittest.TestLoader()
    return loader.loadTestsFromTestCase(DirectivesTest)

if __name__=='__main__':
    unittest.TextTestRunner().run(test_suite())



=== Added File Zope3/lib/python/Zope/I18n/tests/testGettextMessageCatalog.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""Test a gettext implementation of a Message Catalog.

$Id: testGettextMessageCatalog.py,v 1.1 2002/06/12 18:38:58 srichter Exp $
"""
import unittest, sys, os
from Zope.I18n.GettextMessageCatalog import GettextMessageCatalog
from testIMessageCatalog import TestIMessageCatalog


class GettextMessageCatalogTest(TestIMessageCatalog):


    def _getMessageCatalog(self):
        from Zope.I18n import tests
        path = os.path.split(tests.__file__)[0]
        self._path = os.path.join(path, 'en-default.mo')
        catalog = GettextMessageCatalog('en', 'default', self._path)
        return catalog

    
    def _getUniqueIndentifier(self):
        return self._path



def test_suite():
    loader=unittest.TestLoader()
    return loader.loadTestsFromTestCase(GettextMessageCatalogTest)

if __name__=='__main__':
    unittest.TextTestRunner().run(test_suite())


=== Added File Zope3/lib/python/Zope/I18n/tests/testGlobalTranslationService.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""This module tests the regular persistent Translation Service.

$Id: testGlobalTranslationService.py,v 1.1 2002/06/12 18:38:58 srichter Exp $
"""
import unittest, sys, os
from Zope.I18n.GlobalTranslationService import GlobalTranslationService
from Zope.I18n.GettextMessageCatalog import GettextMessageCatalog 
from testITranslationService import TestITranslationService


class TestGlobalTranslationService(TestITranslationService):

    def _getTranslationService(self):
        service = GlobalTranslationService('default') 

        
        from Zope.I18n import tests
        path = os.path.split(tests.__file__)[0]
        en_catalog = GettextMessageCatalog('en', 'default',
                                           os.path.join(path, 'en-default.mo'))
        de_catalog = GettextMessageCatalog('de', 'default',
                                           os.path.join(path, 'de-default.mo'))

        service.addCatalog(en_catalog)
        service.addCatalog(de_catalog)

        return service


def test_suite():
    loader=unittest.TestLoader()
    return loader.loadTestsFromTestCase(TestGlobalTranslationService)

if __name__=='__main__':
    unittest.TextTestRunner().run(test_suite())


=== Added File Zope3/lib/python/Zope/I18n/tests/testIMessageCatalog.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""This is an 'abstract' test for the IMessageCatalog interface.

$Id: testIMessageCatalog.py,v 1.1 2002/06/12 18:38:58 srichter Exp $
"""

import unittest
from Interface.Verify import verifyObject
from Zope.I18n.IMessageCatalog import IMessageCatalog


class TestIMessageCatalog(unittest.TestCase):


    # This should be overwritten by every class that inherits this test
    def _getMessageCatalog(self):
        pass
    
    def _getUniqueIndentifier(self):
        pass


    def setUp(self):
        self._catalog = self._getMessageCatalog() 
        assert verifyObject(IMessageCatalog, self._catalog)


    def testGetMessage(self):
        catalog = self._catalog    
        self.assertEqual(catalog.getMessage('short_greeting'), 'Hello!')
        self.assertRaises(KeyError, catalog.getMessage, ('foo',))
        

    def testQueryMessage(self):
        catalog = self._catalog    
        self.assertEqual(catalog.queryMessage('short_greeting'), 'Hello!')
        self.assertEqual(catalog.queryMessage('foo'), 'foo')
        self.assertEqual(catalog.queryMessage('foo', 'bar'), 'bar')

        
    def testGetLanguage(self):
        catalog = self._catalog    
        self.assertEqual(catalog.getLanguage(), 'en')


    def testGetDomain(self):
        catalog = self._catalog    
        self.assertEqual(catalog.getDomain(), 'default')


    def testGetIdentifier(self):
        catalog = self._catalog    
        self.assertEqual(catalog.getIdentifier(), self._getUniqueIndentifier())


def test_suite():
    pass


=== Zope3/lib/python/Zope/I18n/tests/testITranslationService.py 1.1 => 1.2 ===
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+# 
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+# 
+##############################################################################
+"""This is an 'abstract' test for the ITranslationService interface.
+
+$Id$
+"""
+
+import unittest
+from Interface.Verify import verifyObject
+from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
+from Zope.App.ComponentArchitecture.metaConfigure import \
+     provideService, managerHandler
+from Zope.I18n.Negotiator import negotiator
+from Zope.I18n.INegotiator import INegotiator
+from Zope.I18n.IUserPreferredLanguages import IUserPreferredLanguages
+from Zope.I18n.ITranslationService import ITranslationService
+from Zope.I18n.IDomain import IDomain
+
+
+class Environment:
+
+    __implements__ = IUserPreferredLanguages
+
+    def __init__(self, langs=()):
+        self.langs = langs
+
+    def getPreferredLanguages(self):
+        return self.langs
+
+
+
+class TestITranslationService(PlacelessSetup, unittest.TestCase):
+
+
+    # This should be overwritten by every clas that inherits this test
+    def _getTranslationService(self):
+        pass
+    
+
+    def setUp(self):
+        PlacelessSetup.setUp(self)
+        self._service = self._getTranslationService() 
+        assert verifyObject(ITranslationService, self._service)
+
+        # Setup the negotiator service registry entry
+        managerHandler('defineService', 'LanguageNegotiation', INegotiator) 
+        provideService('LanguageNegotiation', negotiator, 'Zope.Public')
+        
+
+    # I know, I know. This is not part of the interface, but it is implemented
+    # in every Translation Service, so it fits well here.
+    def testInterpolation(self):
+        service = self._service
+        mapping = {'name': 'Zope', 'version': '3x'}
+
+        self.assertEqual(service.interpolate(
+            'This is $name.', mapping),
+                         'This is Zope.')
+        self.assertEqual(service.interpolate(
+            'This is ${name}.', mapping),
+                         'This is Zope.')
+        self.assertEqual(service.interpolate(
+            'This is $name version $version.', mapping),
+                         'This is Zope version 3x.')
+        self.assertEqual(service.interpolate(
+            'This is ${name} version $version.', mapping),
+                         'This is Zope version 3x.')
+        self.assertEqual(service.interpolate(
+            'This is $name version ${version}.', mapping),
+                         'This is Zope version 3x.')
+        self.assertEqual(service.interpolate(
+            'This is ${name} version ${version}.', mapping),
+                         'This is Zope version 3x.')
+        
+
+    def testSimpleNoTranslate(self):
+        service = self._service
+        self.assertRaises(TypeError, service.translate, 'Hello')
+    
+        self.assertEqual(service.translate('default', 'short_greeting',
+                                           target_language='es'),
+                         'short_greeting')
+
+        context = Environment()
+        self.assertEqual(service.translate('default', 'short_greeting',
+                                           context=context),
+                         'short_greeting')
+    
+        self.assertRaises(TypeError, service.translate, 'short_greeting',
+                          context=None)
+    
+    
+    def testSimpleTranslate(self):
+        service = self._service
+        self.assertEqual(service.translate('default', 'short_greeting',
+                                           target_language='de'),
+                         'Hallo!')
+
+    
+    def testDynamicTranslate(self):
+        service = self._service    
+        self.assertEqual(service.translate('default', 'greeting',
+                                           mapping={'name': 'Stephan'},
+                                           target_language='de'),
+                         'Hallo Stephan, wie geht es Dir?')
+        
+
+    def testGetDomain(self):
+        service = self._service    
+        domain = service.getDomain('default')
+        self.assertEqual(verifyObject(IDomain, domain), 1)
+
+        
+def test_suite():
+    pass


=== Added File Zope3/lib/python/Zope/I18n/tests/testSimpleTranslationService.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""This module tests the regular persistent Translation Service.

$Id: testSimpleTranslationService.py,v 1.1 2002/06/12 18:38:58 srichter Exp $
"""
import unittest
from Zope.I18n.SimpleTranslationService import SimpleTranslationService
from testITranslationService import TestITranslationService


class TestSimpleTranslationService(TestITranslationService):

    def _getTranslationService(self):
        service = SimpleTranslationService(
            {('default', 'en', 'short_greeting'): 'Hello!',
             ('default', 'de', 'short_greeting'): 'Hallo!',
             ('default', 'en', 'greeting'): 'Hello $name, how are you?',
             ('default', 'de', 'greeting'): 'Hallo $name, wie geht es Dir?'}
            ) 

        return service


def test_suite():
    loader=unittest.TestLoader()
    return loader.loadTestsFromTestCase(TestSimpleTranslationService)

if __name__=='__main__':
    unittest.TextTestRunner().run(test_suite())


=== Zope3/lib/python/Zope/I18n/tests/testMessageCatalog.py 1.2 => 1.3 ===
 # 
 ##############################################################################
-"""
+"""Test the generic persistent Message Catalog.
 
 $Id$
 """
-import unittest, sys
+import unittest
 
 from Zope.I18n.MessageCatalog import MessageCatalog
+from testIMessageCatalog import TestIMessageCatalog
+
+
+class MessageCatalogTest(TestIMessageCatalog):
+
+
+    def _getMessageCatalog(self):
+        catalog = MessageCatalog('en', 'default')
+        catalog.setMessage('short_greeting', 'Hello!')
+        catalog.setMessage('greeting', 'Hello $name, how are you?')
+        return catalog
+    
+    def _getUniqueIndentifier(self):
+        return ('en', 'default')
+
 
+    def testSetMessage(self):
+        catalog = self._catalog
+        catalog.setMessage('new', 'New Test')
+        self.assertEqual(catalog.getMessage('new'), 'New Test')
 
-class MessageCatalogTest(unittest.TestCase):
 
-    def testConstructorAndOtherGetMethods(self):
-        self.assertRaises(TypeError, MessageCatalog)
-        
-        msg_catalog = MessageCatalog('en')
-        self.assertEqual(msg_catalog.getLanguage(), 'en')
-        self.assertEqual(msg_catalog.getDomain(), 'global')
-        self.assertEqual(msg_catalog.getIdentifier(), ('en', 'global'))
-
-        msg_catalog = MessageCatalog('de', 'calendar')
-        self.assertEqual(msg_catalog.getLanguage(), 'de')
-        self.assertEqual(msg_catalog.getDomain(), 'calendar')
-        self.assertEqual(msg_catalog.getIdentifier(), ('de', 'calendar'))
-
-
-    def testSetGetAndQueryMessage(self):
-        msg_catalog = MessageCatalog('de')
-        
-        msg_catalog.setMessage('greeting', 'Hallo mein Schatz!')
-        self.assertEqual(msg_catalog.getMessage('greeting'),
-                         'Hallo mein Schatz!')
-        self.assertEqual(msg_catalog.queryMessage('greeting'),
-                         'Hallo mein Schatz!')
-        
-        self.assertRaises(KeyError, msg_catalog.getMessage, ('hello'))
-        self.assertEqual(msg_catalog.queryMessage('hello'),
-                         'hello')
-        self.assertEqual(msg_catalog.queryMessage('hello', 'greeting'),
-                         'greeting')
+    def testGetMessageIds(self):
+        catalog = self._catalog
+        ids = catalog.getMessageIds()
+        ids.sort()
+        self.assertEqual(ids, ['greeting', 'short_greeting'])
 
 
 def test_suite():


=== Zope3/lib/python/Zope/I18n/tests/testTranslationService.py 1.3 => 1.4 ===
 # 
 ##############################################################################
+"""This module tests the regular persistent Translation Service.
+
+$Id$
+"""
 import unittest, sys
-from Zope.ComponentArchitecture.tests.PlacelessSetup import PlacelessSetup
-from Zope.I18n.IUserPreferredLanguages import IUserPreferredLanguages
+
 from Zope.I18n.TranslationService import TranslationService
 from Zope.I18n.MessageCatalog import MessageCatalog 
-from types import StringType
+from testITranslationService import TestITranslationService
 
 
-class Environment:
+class TestTranslationService(TestITranslationService):
 
-    __implements__ = IUserPreferredLanguages
+    def _getTranslationService(self):
+        service = TranslationService('default') 
 
-    def __init__(self, langs=()):
-        self.langs = langs
-
-    def getPreferredLanguages(self):
-        return self.langs
-
-
-class TestTranslationService(PlacelessSetup, unittest.TestCase):
-
-    def testInterpolation(self):
-        service = TranslationService()
-        mapping = {'name': 'Zope', 'version': '3x'}
-        interp = service.interpolate
-        eq = self.assertEqual
-        # Test simple interpolations
-        eq(interp('This is $name.', mapping), 'This is Zope.')
-        eq(interp('This is ${name}.', mapping), 'This is Zope.')
-        # Test more than one interpolation variable
-        eq(interp('This is $name version $version.', mapping),
-           'This is Zope version 3x.')
-        eq(interp('This is ${name} version $version.', mapping),
-           'This is Zope version 3x.')
-        eq(interp('This is $name version ${version}.', mapping),
-           'This is Zope version 3x.')
-        eq(interp('This is ${name} version ${version}.', mapping),
-           'This is Zope version 3x.')
-        # Test escaping the $
-        eq(interp('This is $$name.', mapping), 'This is $$name.')
-        eq(interp('This is $${name}.', mapping), 'This is $${name}.')
-
-    def setUp(self):
-        PlacelessSetup.setUp(self)
-        self._service = TranslationService('default') 
-        # Create an English and a German message catalog
         en_catalog = MessageCatalog('en', 'default')
         de_catalog = MessageCatalog('de', 'default')
         # Populate the catalogs with translations of a message id
@@ -65,49 +35,11 @@
         # And another message id with interpolation placeholders
         en_catalog.setMessage('greeting', 'Hello $name, how are you?')
         de_catalog.setMessage('greeting', 'Hallo $name, wie geht es Dir?')
-        # Add the message catalogs to the translation service
-        self._service.setObject('en-default-1', en_catalog)
-        self._service.setObject('de-default-1', de_catalog)
-
-    def testSimpleNoTranslate(self):
-        service = self._service
-        translate = service.translate
-        raises = self.assertRaises
-        eq = self.assertEqual
-        # Test that we have at least the minimum required arguments
-        raises(TypeError, translate, 'Hello')
-        # Test that a translation in an unsupported language returns the
-        # original message id unchanged.
-        eq(translate('default', 'short_greeting', target_language='es'),
-           'short_greeting')
-        # Same test, but use the context argument instead of target_language
-        context = Environment()
-        eq(translate('default', 'short_greeting', context=context),
-           'short_greeting')
-        # Test that at least one of context or target_language is given
-        raises(TypeError, translate, 'short_greeting', context=None)
-    
-    def testSimpleTranslate(self):
-        service = self._service
-        translate = service.translate
-        eq = self.assertEqual
-        # Test that a given message id is properly translated in a supported
-        # language
-        eq(translate('default', 'short_greeting', target_language='de'),
-           'Hallo!')
-        # Same test, but use the context argument
-        context = Environment(('de', 'en'))
-        eq(translate('default', 'short_greeting', target_language='de'),
-           'Hallo!')
-
-    def testDynamicTranslate(self):
-        service = self._service
-        translate = service.translate
-        eq = self.assertEqual
-        # Testing both translation and interpolation
-        eq(translate('default', 'greeting', mapping={'name': 'Stephan'},
-                     target_language='de'),
-           'Hallo Stephan, wie geht es Dir?')
+
+        service.setObject('en-default-1', en_catalog)
+        service.setObject('de-default-1', de_catalog)
+
+        return service
 
     def testParameterNames(self):
         service = self._service