@pytest.mark.cmd
@pytest.mark.django_db
def test_find_duplicate_emails_noemails(capfd, member, member2):
 call_command('find_duplicate_emails')
 (out, err) = capfd.readouterr()
 assert ('The following users have no email set' in out)
 assert ('member ' in out)
 assert ('member2' in out)

@ pytest . mark . cmd @ pytest . mark . django_db def test_find_duplicate_emails_noemails ( capfd , member , member2 ) : call_command ( 'find_duplicate_emails' ) ( out , err ) = capfd . readouterr ( ) assert ( 'The following users have no email set' in out ) assert ( 'member ' in out ) assert ( 'member2' in out )
user have no email set .