1
# -*- coding: utf-8 -*-
3
# Copyright 2012 Canonical Ltd.
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 3, as published
7
# by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
# PURPOSE. See the GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License along
15
# with this program. If not, see <http://www.gnu.org/licenses/>.
17
from configglue import schema
18
from configglue.glue import configglue
22
class SstSchema(schema.Schema):
24
default_timeout = schema.IntOption(default=40)
26
class Server(schema.Section):
27
environment = schema.StringOption(default='staging')
28
url = schema.StringOption(default=None)
29
sso_url = schema.StringOption(default=None)
30
files_url = schema.StringOption(default=None)
33
class DefaultUser(schema.Section):
34
full_name = schema.StringOption()
35
email_address = schema.StringOption()
36
password = schema.StringOption()
39
class NewUser(schema.Section):
40
full_name_pattern = schema.StringOption(default='Test user %s',
42
email_address_pattern = schema.StringOption(raw=True)
43
password = schema.StringOption(default='Hola123*')
44
imap_server = schema.StringOption()
45
imap_port = schema.IntOption(default=993)
46
imap_use_ssl = schema.BoolOption(default=True)
47
imap_username = schema.StringOption()
48
imap_password = schema.StringOption()
51
class MusicUser(schema.Section):
52
full_name = schema.StringOption()
53
email_address = schema.StringOption()
54
password = schema.StringOption()
56
# XXX The command line arguments are for SST, not for u1 tests.
57
# We will do something to SST on the future so it uses configglue,
58
# or makes available all the additional arguments.
60
current_dir = os.path.dirname(os.path.abspath(__file__))
61
glue = configglue(SstSchema, os.path.join(current_dir, 'local.cfg'))