diff --git a/mutalyzer/webservice.py b/mutalyzer/webservice.py index 8009bc3f020e790f216ac12c215b6e9ceca951c7..2feecd256ef36e4f5ba652eae8cc0192aa5b57a9 100644 --- a/mutalyzer/webservice.py +++ b/mutalyzer/webservice.py @@ -886,6 +886,17 @@ class MutalyzerService(DefinitionBase): return result #info + @soap(_returns = Mandatory.String) + def ping(self): + """ + Simple function to test the interface. + + @return: Always the value 'pong'. + @rtype: string + """ + return 'pong' + #ping + @soap(DateTime, _returns = Array(CacheEntry)) def getCache(self, created_since=None): """ diff --git a/tests/test_webservice.py b/tests/test_webservice.py index b0c4bee67fba27bf462e5f3ca0659af74f574f80..509cc0b70453a0bb890dc8388cfef379a93e3001 100644 --- a/tests/test_webservice.py +++ b/tests/test_webservice.py @@ -59,7 +59,7 @@ class TestWebservice(): @todo: Start the standalone server and stop it in self.tearDown instead of depending on some running instance at a fixed address. """ - self.client = Client(WSDL_URL)#, cache=None) + self.client = Client(WSDL_URL) #, cache=None) self.client.options.cache.setduration(seconds=120) def test_checksyntax_valid(self): @@ -235,3 +235,10 @@ class TestWebservice(): 'NM_004011.3', 'NM_004012.3']: assert t in r.string + + def test_ping(self): + """ + Running the ping method should return 'pong'. + """ + r = self.client.service.ping() + assert_equal(r, 'pong')