~canonical-platform-qa/snappy-ecosystem-tests/no-ephemeral-containers

« back to all changes in this revision

Viewing changes to snappy_ecosystem_tests/helpers/snapcraft/constants.py

  • Committer: Heber Parrucci
  • Date: 2017-02-15 13:56:40 UTC
  • mfrom: (6.1.11 snappy-ecosystem-tests)
  • Revision ID: heber.parrucci@canonical.com-20170215135640-slzmv5k54hd71our
Fixing comments on code review.
Fixing pylint issues.
Addind a simple test for login to Store REST API

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
 
2
#
 
3
# Copyright (C) 2016 Canonical Ltd
 
4
#
 
5
# This program is free software: you can redistribute it and/or modify
 
6
# it under the terms of the GNU General Public License version 3 as
 
7
# published by the Free Software Foundation.
 
8
#
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License
 
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 
 
17
"""Store snapcraft constants"""
 
18
 
 
19
from __future__ import absolute_import, unicode_literals
 
20
 
 
21
 
 
22
DEFAULT_SERIES = '16'
 
23
SCAN_STATUS_POLL_DELAY = 5
 
24
SCAN_STATUS_POLL_RETRIES = 5
 
25
 
 
26
# Messages and warnings.
 
27
MISSING_AGREEMENT = 'Developer has not signed agreement.'
 
28
MISSING_NAMESPACE = 'Developer profile is missing short namespace.'
 
29
AGREEMENT_ERROR = (
 
30
    'You must agree to the developer terms and conditions to upload snaps.')
 
31
NAMESPACE_ERROR = (
 
32
    'You need to set a username. It will appear in the developer field '
 
33
    'alongside the other details for your snap. Please visit {} and login '
 
34
    'again.')
 
35
AGREEMENT_INPUT_MSG = (
 
36
    'Do you agree to the developer terms and conditions. ({})? [y/N] ')
 
37
AGREEMENT_SIGN_ERROR = (
 
38
    'Unexpected error encountered during signing the developer terms and '
 
39
    'conditions. Please visit {} and agree to the terms and conditions before '
 
40
    'continuing.')
 
41
TWO_FACTOR_WARNING = (
 
42
    'We strongly recommend enabling multi-factor authentication: '
 
43
    'https://help.ubuntu.com/community/SSO/FAQs/2FA')
 
44
INVALID_CREDENTIALS = 'Invalid credentials supplied.'
 
45
AUTHENTICATION_ERROR = ('Problems encountered when authenticating your '
 
46
                        'credentials.')
 
47
ACCOUNT_INFORMATION_ERROR = ('Unexpected error when obtaining your account '
 
48
                             'information.')