#NEWLINE# @ pytest . mark . django_db #NEWLINE# def test_force_makes_new_request( self , mock_requests , monkeypatch ) : #NEWLINE# #INDENT# requests . HarvesterResponse ( ok = True , method = 'get' , url = 'dinosaurs.sexy' , content = b'citychicken' ) . save ( ) #NEWLINE# mock_requests . request . return_value = mock . Mock ( ok = True , encoding = 'utf-8' , content = b'Snapcity' , status_code = 200 , headers = { #NEWLINE# #INDENT# 'tota' : 'dyle' , #NEWLINE# #UNINDENT# } ) #NEWLINE# resp = requests . get ( 'dinosaurs.sexy' ) #NEWLINE# assert ( resp . content == b'citychicken' ) #NEWLINE# assert ( mock_requests . request . called is False ) #NEWLINE# resp = requests . get ( 'dinosaurs.sexy' , force = True ) #NEWLINE# assert ( resp . content == b'Snapcity' ) #NEWLINE# assert ( mock_requests . request . called is True )