1
# Copyright 2009 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""Utilities for Windmill tests written in Python."""
12
def get_basic_login_url(email, password):
13
"""Return the constructed url to login a user."""
14
base_url = windmill.settings['TEST_URL']
15
basic_auth_url = base_url.replace('http://', 'http://%s:%s@')
16
basic_auth_url = basic_auth_url + '+basiclogin'
17
return basic_auth_url % (email, password)
21
"""Object representing well-known user on Launchpad."""
23
def __init__(self, display_name, email, password):
24
self.display_name = display_name
26
self.password = password
30
SAMPLE_PERSON = LaunchpadUser(
31
'Sample Person', 'test@canonical.com', 'test')
33
FOO_BAR = LaunchpadUser(
34
'Foo Bar', 'foo.bar@canonical.com', 'test')
36
NO_PRIV = LaunchpadUser(
37
'No Privileges User', 'no-priv@canonical.com', 'test')
39
TRANSLATIONS_ADMIN = LaunchpadUser(
40
u'Carlos Perell\xf3 Mar\xedn', 'carlos@canonical.com', 'test')