self.assertIn(first, [one_value, another_value])
Yours,
Russ Magee %-)
On 01/02/2012, at 8:42 AM, Furbee wrote:
> I think you can do something like:
> assertTrue(first == one_value or first == second_value)
>
> At the same time, when unit testing, you should really know exactly what a value returned from a method is.
>
> Furbee
>
> On Tue, Jan 31, 2012 at 4:32 PM, xino12 <xinatowner@gmail.com> wrote:
> Hello, I'm doing unitTesting and I want to know if it's possible to
> accept more than one value in the assetEqual method.
>
> Maybe this works
>
> assertEqual(first, one_value or another_value)
>
> Sorry but I'm new programming with django.
>
> Lots of thanks,
>
> Rubén
>
> --
> 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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>
>
> --
> 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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment