def METHOD_NAME(capsys, settings):
    settings.DEBUG = True
    emails = User.objects.values_list('email', flat=True)
    assert all(email.endswith("@gmail.com") for email in emails)
    with pytest.raises(CommandError, match='No groups matches filter: TEST'):
        call_command('set_fake_emails', '--exclude-groups=TEST')
    assert not User.objects.filter(email__endswith='@example.com').exists()