def test_init_fault(self, initmock): def raiser(*args): raise Exception("Boom!") initmock.side_effect = raiser self.assertEqual(True, ACSCorba.getORB() is None)
# Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # @(#) $Id: acspyTestAcsCORBA.py,v 1.1.1.1 2012/03/07 17:41:01 acaproni Exp $ ############################################################################### ''' Tests CORBA access. ''' from Acspy.Util import ACSCorba ############################################################################### if __name__ == '__main__': print 'Manager corbaloc: %s' % ACSCorba.getManagerCorbaloc() print 'ORB: %s' % ACSCorba.getORB() print 'POA ROOT: %s' % ACSCorba.getPOARoot() print 'POA Manager: %s' % ACSCorba.getPOAManager() print 'Manager: %s' % ACSCorba.getManager() print 'Client: %s' % ACSCorba.getClient() print 'Log: %s' % ACSCorba.log() print 'LogFactory: %s' % ACSCorba.logFactory() print 'NotifyEventChannelFactory: %s' % ACSCorba.notifyEventChannelFactory() print 'ArchivingChannel: %s' % ACSCorba.archivingChannel() print 'LoggingChannel: %s' % ACSCorba.loggingChannel() print 'InterfaceRepository: %s' % ACSCorba.interfaceRepository() print 'CDB: %s' % ACSCorba.cdb() print 'ACSLogSvc: %s' % ACSCorba.acsLogSvc() print 'NameService: %s' % ACSCorba.nameService()
def test_ok(self, initmock, rootmock): self.assertEqual(False, ACSCorba.getORB() is None)
def test_orb_exists(self): ACSCorba.ORB = 'foo' self.assertEqual('foo', ACSCorba.getORB())
# # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # # @(#) $Id: acspyTestAcsCORBA.py,v 1.1.1.1 2012/03/07 17:40:45 acaproni Exp $ ############################################################################### ''' Tests CORBA access. ''' from Acspy.Util import ACSCorba ############################################################################### if __name__ == '__main__': print 'Manager corbaloc: %s' % ACSCorba.getManagerCorbaloc() print 'ORB: %s' % ACSCorba.getORB() print 'POA ROOT: %s' % ACSCorba.getPOARoot() print 'POA Manager: %s' % ACSCorba.getPOAManager() print 'Manager: %s' % ACSCorba.getManager() print 'Client: %s' % ACSCorba.getClient() print 'Log: %s' % ACSCorba.log() print 'LogFactory: %s' % ACSCorba.logFactory() print 'NotifyEventChannelFactory: %s' % ACSCorba.notifyEventChannelFactory( ) print 'ArchivingChannel: %s' % ACSCorba.archivingChannel() print 'LoggingChannel: %s' % ACSCorba.loggingChannel() print 'InterfaceRepository: %s' % ACSCorba.interfaceRepository() print 'CDB: %s' % ACSCorba.cdb() print 'ACSLogSvc: %s' % ACSCorba.acsLogSvc() print 'NameService: %s' % ACSCorba.nameService()
def test_init_fault(self, initmock): def raiser(*args): raise Exception("Boom!") initmock.side_effect = raiser self.assertEqual(True, ACSCorba.getORB() is None)
def test_orb_exists(self): ACSCorba.ORB = 'foo' self.assertEqual('foo', ACSCorba.getORB())
def test_ok(self, initmock, rootmock): self.assertEqual(False, ACSCorba.getORB() is None)
def test_orb_exists(self): ACSCorba.ORB = "foo" self.assertEqual("foo", ACSCorba.getORB())