#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( _BaseObjectTestCase , self ) . setUp ( ) #NEWLINE# self . context = context . get_admin_context ( ) #NEWLINE# self . db_objs = list ( ( self . get_random_fields ( ) for _ in range ( 3 ) ) ) #NEWLINE# self . db_obj = self . db_objs [ 0 ] #NEWLINE# self . obj_fields = [ ] #NEWLINE# for db_obj in self . db_objs : #NEWLINE# #INDENT# self . obj_fields . append ( self . _test_class . modify_fields_from_db ( db_obj ) ) #NEWLINE# #UNINDENT# valid_field = [ f for f in self . _test_class . fields if ( f not in self . _test_class . synthetic_fields ) ] [ 0 ] #NEWLINE# self . valid_field_filter = { #NEWLINE# #INDENT# valid_field : self . obj_fields [ 0 ] [ valid_field ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . obj_registry = self . useFixture ( fixture . VersionedObjectRegistryFixture ( ) ) #NEWLINE# self . obj_registry . register ( FakeSmallNeutronObject ) #NEWLINE# self . obj_registry . register ( FakeWeirdKeySmallNeutronObject ) #NEWLINE# self . obj_registry . register ( FakeNeutronObjectMultipleForeignKeys ) #NEWLINE# synthetic_obj_fields = self . get_random_fields ( FakeSmallNeutronObject ) #NEWLINE# self . model_map = { #NEWLINE# #INDENT# self . _test_class . db_model : self . db_objs , #NEWLINE# ObjectFieldsModel : [ synthetic_obj_fields ] , #NEWLINE# #UNINDENT# }