예제 #1
0
 def run_test( source, expected_data ):
     
     destination = ClientMigration.MigrationDestinationListPairs( self )
     
     job = ClientMigration.MigrationJob( self, 'test', source, destination )
     
     job.Run()
     
     self.assertEqual( set( destination.GetDataReceived() ), set( expected_data ) )
예제 #2
0
 def _test_pairs_list_to_list( self, content_type ):
     
     ( current, pending, to_be_pended, deleted ) = pair_types_to_pools[ content_type ]
     
     data = list( current )
     
     self.assertTrue( len( data ) > 0 )
     
     source = ClientMigration.MigrationSourceList( self, data )
     destination = ClientMigration.MigrationDestinationListPairs( self )
     
     job = ClientMigration.MigrationJob( self, 'test', source, destination )
     
     job.Run()
     
     self.assertEqual( destination.GetDataReceived(), data )