Here's the code that process all steps in unittest with checking
validation form:

http://dpaste.com/123059/

What I have tryed is to collect data myself as fixture to test the
form validation.

Thanks

On Feb 20, 7:00 pm, Briel <toppe...@gmail.com> wrote:
> You don't give a lot information about what is happening, so I'm
> stabbing a bit in the dark here...
>
> I would guess your problem is that you have created a form which has a
> filefield that is required. Even though you probably upload a file and
> maybe even pass it to the form, you are not doing it in a way that
> django can understand. Probably because you choose to construct your
> own date instead of using the data from request.POST and
> request.FILES. It would be a much better approach to use the data from
> request, and then if it needs to be altered, to do it in the form
> validation. This could be done if you fx have a models primary key and
> instead want to return the object.
>
> Anyways, if this doesn't help you, you would help yourself a lot if
> you do explain what exactly the problem is, what you are doing, maybe
> a little snippet of code.
>
> On Feb 20, 5:01 pm, Vitaly <hash...@gmail.com> wrote:
>
> > Hi all
>
> > I have a test that validate processed data to form with FileField. My
> > steps in it direct me right to one problem. here is it.
>
> > 'file' is 'Required field'
>
> > What I do is process simple data right to form, not request.POST and
> > request.FILES.
> > I have tried process in data SimpleUploadedFile but no result.
>
> > Why is it? and how this problem can be solved?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to