Tests for safe_queryset_and