#NEWLINE# def test_admins_does_not_return_non_admin_users( ) : #NEWLINE# #INDENT# non_admins = [ factories . User ( admin = False ) for _ in range ( 0 , 2 ) ] #NEWLINE# db . Session . add_all ( admins ) #NEWLINE# db . Session . add_all ( [ factories . User ( admin = True ) for _ in range ( 0 , 2 ) ] ) #NEWLINE# admins = models . User . admins ( ) #NEWLINE# for non_admin in non_admins : #NEWLINE# #INDENT# assert ( non_admin not in admins )