#NEWLINE# def test_it_shows_only_users_checks( self ) : #NEWLINE# #INDENT# bob = User ( username = 'bob' , email = 'bob@example.com' ) #NEWLINE# bob . save ( ) #NEWLINE# bob_check = Check ( user = bob , name = 'Bob 1' ) #NEWLINE# r = self . get ( '/api/v1/checks/' , { #NEWLINE# #INDENT# 'api_key' : 'abc' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( len ( r . json ( ) [ 'checks' ] ) , 2 ) #NEWLINE# checks = { check [ 'name' ] : check for check in r . json ( ) [ 'checks' ] } #NEWLINE# self . assertNotIn ( 'Bob 1' , checks )