Ejemplo n.º 1
0
def test_get_mail_vhosts():
    assert get_mail_vhosts() == {
        MailVirtualHost('staff', 'dev-vhost.ocf.berkeley.edu'),
        MailVirtualHost('staff', 'dev-dev-vhost.ocf.berkeley.edu'),
        MailVirtualHost('ckuehl', 'ckuehl.berkeley.edu'),
        MailVirtualHost('daradib', 'daradib.wat'),
    }
Ejemplo n.º 2
0
def test_get_mail_vhosts():
    assert get_mail_vhosts() == {
        MailVirtualHost('staff', 'dev-vhost.ocf.berkeley.edu'),
        MailVirtualHost('staff', 'dev-dev-vhost.ocf.berkeley.edu'),
        MailVirtualHost('ckuehl', 'ckuehl.berkeley.edu'),
        MailVirtualHost('daradib', 'daradib.wat'),
    }
Ejemplo n.º 3
0
def main():
    user = '******'
    password = getpass.getpass('enter password for {}: '.format(user))

    with get_connection(user, password) as c:
        for vhost in get_mail_vhosts():
            print('{vhost.domain} ({vhost.user}):'.format(vhost=vhost))
            print('=' * 50)

            for addr in vhost.get_forwarding_addresses(c):
                print('    {}'.format(addr))

            print()
Ejemplo n.º 4
0
def main():
    user = '******'
    password = getpass.getpass('enter password for {}: '.format(user))

    with get_connection(user, password) as c:
        for vhost in get_mail_vhosts():
            print('{vhost.domain} ({vhost.user}):'.format(vhost=vhost))
            print('=' * 50)

            for addr in vhost.get_forwarding_addresses(c):
                print('    {}'.format(addr))

            print()
Ejemplo n.º 5
0
def test_mail_vhosts():
    mail_vhosts = get_mail_vhosts()

    # Make sure we're actually getting some app vhosts back
    assert(any(mail_vhosts))

    # Check that the ggroup user has some mail vhosts (these are used for
    # testing by OCF staff so they're likely to stick around)
    assert(any(vhosts_for_user('ggroup')))

    # Check that dev-vhost.o.b.e exists as an mail vhost (this is used for
    # testing by OCF staff, so it's likely to stick around)
    assert(
        'dev-vhost.ocf.berkeley.edu' in {vhost.domain for vhost in mail_vhosts}
    )