def test_do_export_emails_stdout_end(capsys): """Testing export_emails command without args.stdout end.""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails']) out, err = capsys.readouterr() assert '"Frédéric Mistral" <*****@*****.**>;\n\n' in out
def test_do_export_emails_format_google(capsys): """Testing python manage export_emails -f google""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails', '--format=google']) out, err = capsys.readouterr() assert out.startswith('Name,Email')
def test_do_export_emails_stdout_start(capsys): """Testing export_emails command without args.stdout starts.""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails']) out, err = capsys.readouterr() assert out.startswith('"Mijaíl Bulgakóv')
def test_do_export_emails_format_email(capsys): """Testing python manage.py export_emails -f emails""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails', '--format=emails']) out, err = capsys.readouterr() assert '*****@*****.**' in out
def test_do_export_emails_address(capsys): """Testing python manage export_emails -f address""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails', '--format=address']) out, err = capsys.readouterr() assert '"Frédéric Mistral"' in out
def test_do_export_emails_format_outlook(capsys): """Testing python manage.py export_emails -f outlook""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails', '--format=outlook']) out, err = capsys.readouterr() assert out.startswith('Name,E-mail Address') assert '*****@*****.**' in out
def test_do_export_emails_format_linkedin(capsys): """Testing python manage.py export_emails -f linkedin""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails', '--format=linkedin']) out, err = capsys.readouterr() assert out.startswith('First Name,') assert 'Gabriel Garcia,Marquéz' in out
def test_do_export_emails_format_vcard_start(capsys): """Testing python manage.py export_emails -f vcard""" export_emails = Command() export_emails.run_from_argv(['manage.py', 'export_emails', '--format=vcard']) out, err = capsys.readouterr() assert 'N:Bulgakóv;Mijaíl;;;' in out assert out.startswith('BEGIN:VCARD')