#NEWLINE# @ pytest . mark . django_db #NEWLINE# def test_request_doesnt_throttle_on_load( self , mock_requests , monkeypatch ) : #NEWLINE# #INDENT# mock_sleep = mock . Mock ( ) #NEWLINE# monkeypatch . setattr ( requests , 'maybe_sleep' , mock_sleep ) #NEWLINE# requests . HarvesterResponse ( ok = True , method = 'get' , url = 'dinosaurs.sexy' , content = b'citychicken' ) . save ( ) #NEWLINE# resp = requests . get ( 'dinosaurs.sexy' , throttle = 2 ) #NEWLINE# assert ( mock_sleep . called is False ) #NEWLINE# assert ( monkeypatch . request . called is False ) #NEWLINE# assert isinstance ( resp , requests . HarvesterResponse )