#NEWLINE# @ skipIf ( IS_SQLITE , 'Test not supported when using sqlite backend.' ) #NEWLINE# @ patch . object ( views , 'get_coordinates' ) #NEWLINE# def test_location_provided( self , mock_get_coordinates ) : #NEWLINE# #INDENT# 'Should call get_coordinates' #NEWLINE# mock_get_coordinates . return_value = ( 1 , 1 ) #NEWLINE# self . assertEqual ( mock_get_coordinates . call_count , 0 ) #NEWLINE# request = self . request_factory . get ( '/?location=60657' ) #NEWLINE# request . user = self . user1 #NEWLINE# self . view ( request ) #NEWLINE# self . assertEqual ( self . call_count , 1 )