I have the following model;
class Station(models.Model):
name = models.CharField(max_length=50)
address = models.TextField(default=\'\')
owner = mode
A few issues with your code, this is the output in my console:
>>> station.members
station.members is a ManyRelatedManager rather than a list of user2 and user3.
station.members.all() will return you a list of user2 and user3, but station.members.all() is a QuerySet instead of a list:
>>> type(station.members.all())
So doing assert station.members.all() == [user2, user3]
will never be True.