Skip to content
Snippets Groups Projects
Commit c9c7a374 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #10473: Typo fixes to get initial implementation working

parent 122b91a2
No related branches found
No related tags found
No related merge requests found
......@@ -17,14 +17,14 @@ class ServiceSkeletonHandler(MessageHandlerInterface):
super(ServiceSkeletonHandler, self).__init__(**kwargs)
self.service2MethodMap = {
'ExampleFunction': self._exampleFunction,
'ExampleFunction': self.example_function,
}
def prepare_loop(self):
""" Tread-local initialisation. """
pass
def _exampleFunction(self, arg1):
def example_function(self, arg1):
""" Example service call. """
return { "result": True, "arg1": arg1 }
......
......@@ -22,7 +22,7 @@ import unittest
from lofar.lcs.serviceskeleton.serviceskeleton import ServiceSkeletonHandler
class ServiceSkeletonHandler(unittest.TestCase):
class TestServiceSkeletonHandler(unittest.TestCase):
def setUp(self):
""" Per-test setup. """
......
......@@ -23,20 +23,18 @@ import mock
import uuid
from lofar.lcs.serviceskeleton.config import DEFAULT_SERVICENAME, DEFAULT_BUSNAME
from lofar.lcs.serviceskeleton.skeletonservice_rpc import SkeletonServiceRPC
from lofar.lcs.serviceskeleton.serviceskeleton_rpc import ServiceSkeletonRPC
from qpid.messaging.message import Message as QpidMessage
class TestServiceSkeletonRPC(unittest.TestCase):
message_id = str(uuid.uuid4())
message_properties={
"SystemName": "LOFAR",
"MessageType": "ReplyMessage",
"MessageId": str(uuid.uuid4()),
"status": "OK"
})
}
def setUp(self):
# the mock library had difficulty to mock ToBus and FromBus probably to some weir naming issue.
......@@ -56,7 +54,7 @@ class TestServiceSkeletonRPC(unittest.TestCase):
def test_project_details_query(self, qpid_mock):
self.receiver_mock.fetch.return_value = QpidMessage(
{ "result": True, "arg1": "foo" },
properties=message_properties)
properties=self.message_properties)
self.install_mock(qpid_mock)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment