Abhilash, Thanks! it worked as you said. But renaming clean method is not conventional. I changed the names and it looks like 'clean_password_repeat' is good and that is the last input for that test as well, so I don't understand why but that works.
The 'except' part for 'clean_email' is not functioning as expected and I have already written the validation tests for that part as well. On 28 Feb 2015 09:53, "Abhilash Raj" <raj.abhila...@gmail.com> wrote: > On 27 February 2015 at 20:39, Pranjal Yadav <godricg...@gmail.com> wrote: > > Hi Abhilash, > > > > Thanks for your help. I read that we need to define methods as > > clean_<fieldname> however I missed > > I was cleaning multiple fields. For the listname method it works the way > you > > told me but I tried something > > similar ( http://pastebin.com/p40A19hU ) and it didn't work. If you > could > > tell me why is that? > > The list that you pass in choices is a list of 'tuples' which has 2 > elements in it. > The first is the choice to be displayed in the 'dropdown' and second > is its value. > > So you have to do something like this: > > self.domain_choices = > [('mailman.most-desirable.org','mailman.most-desirable.org')] > > and then call the ListNew class like this: > > form = ListNew(self.domain_choices, self.form_data) > > > Also I'm still puzzled when I run > > tox -e py27-django1.7 -- postorius.tests.test_forms.UserNewTest > > tox -e py27-django1.7 -- postorius.tests.test_forms.ListNewTest > > tox -e py27-django1.7 -- postorius.tests.test_forms.DomainNewTest > > Its not the correct way to run the individual test cases in django, it is > little > different from nose. You can run > > $ tox -e py27-django1.7 -- postorius.test.test_forms:ListNewTest > > -- > thanks, > Abhilash Raj > _______________________________________________ Mailman-Developers mailing list Mailman-Developers@python.org https://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9