How to test the type of a RelatedManager in Django ?
assert type(qs) in [models.QuerySet, models.Manager]
fails if qs is a RelatedManager
how do I test if qs is a RelatedManager
?
ok, found a solution:
assert isinstance(qs, (models.QuerySet, models.Manager))