diff --git a/buildout/tests/assertOpenOfficeSoftware.py b/buildout/tests/assertOpenOfficeSoftware.py new file mode 100644 index 0000000000000000000000000000000000000000..ffa5ab9b586b37130fa370d0e27bf51a057f0f03 --- /dev/null +++ b/buildout/tests/assertOpenOfficeSoftware.py @@ -0,0 +1,24 @@ + + +import unittest +import uno + +class AssertOpenOfficeSoftware(unittest.TestCase): + """ tests try some connection and call some methods from uno""" + + def test_simple_connection(self): + localContext = uno.getComponentContext() + resolver = localContext.ServiceManager.createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", localContext ) + self.assertNotEquals(None, resolver) + remoteContext = resolver.resolve("uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext") + self.assertNotEquals(None, remoteContext) + self.assertNotEquals(None, remoteContext.ServiceManager) + some_filter = remoteContext.ServiceManager.createInstance("com.sun.star.document.FilterFactory") + self.assertNotEquals(None, some_filter) + type_service = remoteContext.ServiceManager.createInstance("com.sun.star.document.TypeDetection") + self.assertNotEquals(None, type_service) + + +if __name__ == '__main__': + unittest.main() +