thanks. that works. now I´m getting an error due to some unicode related stuff:
... self.assertEquals(list(self.movie.details_genre.all()), "[<MovieGenre: Action-Komödie>, <MovieGenre: Komödie>]") ... output: AssertionError: [<MovieGenre: Action-Komödie>, <MovieGenre: Komödie>] ! = '[<MovieGenre: Action-Kom\xc3\xb6die>, <MovieGenre: Kom \xc3\xb6die>]' thanks, patrick On 13 Aug., 17:03, Tim Chase <[EMAIL PROTECTED]> wrote: > > 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 -~----------~----~----~----~------~----~------~--~---