#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# dbfile = self . mktemp ( ) #NEWLINE# self . db = checkers . FilePasswordDB ( r , hash = self . hash ) #NEWLINE# f = file ( dbfile , 'w' ) #NEWLINE# for ( u , p ) in self . users : #NEWLINE# #INDENT# f . write ( ( '%s:%s\n' % ( u , crypt ( p , u [ : 2 ] ) ) ) ) #NEWLINE# #UNINDENT# f . close ( ) #NEWLINE# r = TestRealm ( ) #NEWLINE# self . port = portal . Portal ( r ) #NEWLINE# self . port . registerChecker ( self . db )