Hello, I wrote a newforms form, but I have some problems when I want to test the class. Here's the definition:
def _users(): print "calling _users()" return [(u.id, u.get_full_name()) for u in User.objects.filter(is_active=True)] class MemoForm(forms.Form): body = forms.CharField(widget=forms.Textarea, required=True) recipients = forms.MultipleChoiceField(choices=_users(), required=True) This works fine, however when I run my tests, _users() is called at the very beginning, so the choices in recipients come from my production database, not from the fixtures I wrote. Does anyone know how I could fix this? Thank you, Vincent --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---