Пример #1
0
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
Пример #2
0
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')
Пример #3
0
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
Пример #4
0
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
Пример #5
0
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
Пример #6
0
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')
Пример #7
0
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
Пример #8
0
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
Пример #9
0
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')
Пример #10
0
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')
Пример #11
0
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
Пример #12
0
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
Пример #13
0
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
Пример #14
0
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')
Пример #15
0
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
Пример #16
0
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')