'Helper method that checks that the stored version of the uploaded file has the correct content'

def _verify_successful_upload(self, storage, file_name, expected_content):

    self.assertTrue(storage.exists(file_name))
    with storage.open(file_name, 'r') as f:
        self.assertEqual(expected_content, f.read())
