def testSameObjectOnSameName( self ):
     componentFactory = ComponentFactory( None )
     o1 = componentFactory.getByName( 'test' )
     o2 = componentFactory.getByName( 'test' )
     o3 = componentFactory.getByName( 'test2' )
     self.assertTrue( o1 is o2 )
     self.assertFalse( o1 is o3 )
 def testGetAll( self ):
     componentIDs = [ 'component-a', 'component-b' ]
     self.insertComponentsIntoDb( componentIDs )
     componentFactory = ComponentFactory( self._db )
     all = componentFactory.getAllIDs()
     self.assertEquals( componentIDs, all )