#NEWLINE# def test_blacklist_and_delete_ips( self ) : #NEWLINE# #INDENT# '\n        Test the `blacklist_delete_ips` action.\n        ' #NEWLINE# my_admin = User . objects . create_superuser ( 'myuser' , 'myemail@example.com' , '1234' ) #NEWLINE# self . request . user = my_admin #NEWLINE# qs = Hit . objects . all ( ) [ : 5 ] #NEWLINE# self . admin . blacklist_delete_ips ( self . request , my_admin ) #NEWLINE# hit_count = HitCount . objects . get ( pk = 1 ) #NEWLINE# self . assertEqual ( len ( Hit . objects . all ( ) ) , 5 ) #NEWLINE# self . assertEqual ( hit_count . hits , 5 ) #NEWLINE# self . assertEqual ( len ( BlacklistIP . objects . all ( ) ) , 5 )