'Testing whether the API returns 200 if we change the amount of hops of a download'

@deferred(timeout=10)
def test_change_hops(self):

    (video_tdef, _) = self.create_local_torrent(os.path.join(TESTS_DATA_DIR, 'video.avi'))
    self.session.start_download_from_tdef(video_tdef, DownloadStartupConfig())
    infohash = video_tdef.get_infohash().encode('hex')
    return self.do_request(('downloads/%s' % infohash), post_data={'anon_hops': 1}, expected_code=200, expected_json={'modified': True}, request_type='PATCH')
