> now, I just ran into a problem with unittests:
> 
> ...
> self.assertEquals(self.movie.details_country.all(), [])
> ...
> 
> the output is:
> AssertionError: [] != []
> 
> isnĀ“t that supposed to work?


all() returns a queryset object that has list-like behaviors. 
However, it isn't a list and thus (as you discovered) likely has 
trouble when testing for equality with a list-object.  You can 
try either

self.assertEquals(list(self.movie.details_country.all()), [])

or something like

self.assertEquals(self.movie.details_country.count(), 0)

-tim







--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to