

def test_value_from_post(self):
    'Get uploaded file by restoring value from the POST.'
    with self.settings(MEDIA_ROOT=self.temp_dir):
        storage = FileSystemStorage()
        stored = serialize_upload(self.temp_name, storage, self.url)
        value = self.widget.value_from_datadict(data={
            '_myfile': stored,
        }, files={
            
        }, name='myfile')
        self.assertTrue(isinstance(value, File))
        self.assertEqual(value._seralized_location, stored)

dataset/ETHPy150Open caktus/django-sticky-uploads/stickyuploads/tests/test_widgets.py StickyUploadWidgetTestCase.test_value_from_post/original