#NEWLINE# def test_eligibility( self ) : #NEWLINE# #INDENT# self . election . eligibility = [ { #NEWLINE# #INDENT# 'auth_system' : self . user . user_type , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . assertFalse ( self . election . user_eligible_p ( self . user ) ) #NEWLINE# self . election . save ( ) #NEWLINE# e = models . Election . objects . get ( uuid = self . election . uuid ) #NEWLINE# self . assertEquals ( e . eligibility , [ { #NEWLINE# #INDENT# 'auth_system' : self . user . user_type , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# self . election . openreg = True #NEWLINE# self . assertTrue ( self . election . user_eligible_p ( self . user ) ) #NEWLINE# assert ( self . user . user_type in self . election . pretty_eligibility )