'Trying to download deleted files should return 404 error'

def test_removed_file_download(self):

    self.login(self.example_email('hamlet'))
    fp = StringIO('zulip!')
    fp.name = 'zulip.txt'
    result = self.client_post('/json/user_uploads', {'file': fp})
    json = ujson.loads(result.content)
    uri = json['uri']
    destroy_uploads()
    response = self.client_get(uri)
    self.assertEqual(response.status_code, 404)
