

def test_render_with_restored_file(self):
    'Render with File which has been restored.'
    with open(self.temp_name) as temp:
        currently_html = 'Currently: {0} '.format(self.temp_name)
        if (django.VERSION < (1, 6)):
            currently_html = 'Currently: <a href="#">{0}</a> '.format(self.temp_name)
        value = File(temp)
        setattr(value, '_seralized_location', '1234')
        self.assertHTMLEqual(self.widget.render('myfile', value), ((((currently_html + '<input id="myfile-clear_id" name="myfile-clear" type="checkbox" />') + '<label for="myfile-clear_id"> Clear</label><br />') + 'Change:<input type="file" name="myfile" data-upload-url="/sticky-uploads/default/" />') + '<input type="hidden" name="_myfile" value="1234" />'))

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