Commit 4a74ca0e authored by Rafael Monnerat's avatar Rafael Monnerat

Added some early draft work just to verify if the openoffice can reply to some...

Added some early draft work just to verify if the openoffice can reply to some uno commands, this is very far from perfect but it will help assert if openoffice is broken or not.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33971 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7fac1a6b
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()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment