~free.ekanayaka/landscape-client/lucid-1.5.2.1-0ubuntu0.10.04.0

« back to all changes in this revision

Viewing changes to landscape/tests/test_configuration.py

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug, Free Ekanayaka
  • Date: 2009-07-22 14:54:50 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090722145450-pvbp13gh8734c8ft
Tags: 1.3.2.2-0ubuntu0.9.10.1
[ Free Ekanayaka ]
* New upstream release:
  - Include the README file in landscape-client (LP: #396260)
  - Fix client capturing stderr from run_command when constructing
    hash-id-databases url (LP: #397480)
  - Use substvars to conditionally depend on update-motd or
    libpam-modules (LP: #393454)
  - Fix reporting wrong version to the server (LP: #391225)
  - The init script does not wait for the network to be available
    before checking for EC2 user data (LP: #383336)
  - When the broker is restarted by the watchdog, the state of the client
    is inconsistent (LP: #380633)
  - Package stays unknown forever in the client with hash-id-databases
    support (LP: #381356)
  - Standard error not captured when calling smart-update (LP: #387441)
  - Changer calls reporter without switching groups, just user (LP: #388092)
  - Run smart update in the package-reporter instead of having a cronjob (LP: #362355)
  - Package changer does not inherit proxy settings (LP: #381241)
  - The ./test script doesn't work in landscape-client (LP: #381613)
  - The source package should build on all supported releases (LP: #385098)
  - Strip smart update's output (LP: #387331)
  - The fetch() timeout isn't based on activity (#389224)
  - Client can use a UUID of "None" when fetching the hash-id-database (LP: #381291)
  - Registration should use the fqdn rather than just the hostname (LP: #385730)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
from dbus import DBusException
6
6
 
7
 
import pycurl
8
 
 
9
7
from twisted.internet.defer import Deferred, succeed, fail
10
8
from twisted.internet import reactor
11
9
 
12
 
from landscape.lib.fetch import HTTPCodeError
 
10
from landscape.lib.fetch import HTTPCodeError, PyCurlError
13
11
from landscape.configuration import (
14
12
    print_text, LandscapeSetupScript, LandscapeSetupConfiguration,
15
13
    register, setup, main, setup_init_script_and_start_client,
1181
1179
    def test_import_from_url_with_pycurl_error(self):
1182
1180
        fetch_mock = self.mocker.replace("landscape.lib.fetch.fetch")
1183
1181
        fetch_mock("https://config.url")
1184
 
        self.mocker.throw(pycurl.error(60, "pycurl message"))
 
1182
        self.mocker.throw(PyCurlError(60, "pycurl message"))
1185
1183
 
1186
1184
        print_text_mock = self.mocker.replace(print_text)
1187
1185
        print_text_mock("Fetching configuration from https://config.url...")
1196
1194
        except ImportOptionError, error:
1197
1195
            self.assertEquals(str(error), 
1198
1196
                              "Couldn't download configuration from "
1199
 
                              "https://config.url: pycurl message")
 
1197
                              "https://config.url: Error 60: pycurl message")
1200
1198
        else:
1201
1199
            self.fail("ImportOptionError not raised")
1202
1200