~ahasenack/landscape-client/landscape-client-1.5.5-0ubuntu0.9.10.0

« back to all changes in this revision

Viewing changes to landscape/package/tests/test_facade.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-04-21 12:31:28 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100421123128-qwde8pqe5zi6so05
Tags: 1.5.0.1-0ubuntu0.9.10.0
* New upstream version
  - Fix smart-update failing its very first run (LP: #562496)
  - Depend on pythonX.Y-dbus and pythonX.Y-pycurl (LP: #563063)
  - Make only one request at a time to retrieve EC2 instances (LP: #567515)

* New upstream version (LP: #557244)
  - Fix package-changer running before smart-update has completed (LP: #542215)
  - Report the version of Eucalyptus used to generate topology data (LP: #554007)
  - Enable the Eucalyptus plugin by default, if supported (LP: #546531)
  - Use a whitelist of allowed filesystem types to instead of a blacklist (LP: #351927)
  - Report the update-manager logs to the server (LP: #503384)
  - Turn off Curl's DNS caching for requests. (LP: #522668)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
from smart.control import Control
7
7
from smart.cache import Provides
8
 
from smart.const import NEVER
 
8
from smart.const import NEVER, ALWAYS
9
9
 
10
10
from twisted.internet import reactor
11
11
from twisted.internet.defer import Deferred
429
429
        self.facade.reload_channels()
430
430
        self.assertEquals(self.facade.get_package_hash(pkg), None)
431
431
 
 
432
    def test_reload_channels_with_channel_error(self):
 
433
        """
 
434
        The L{SmartFacade.reload_channels} method raises a L{ChannelsError} if
 
435
        smart fails to load the configured channels.
 
436
        """
 
437
        ctrl_mock = self.mocker.patch(Control)
 
438
        ctrl_mock.reloadChannels(caching=ALWAYS)
 
439
        self.mocker.throw(smart.Error(u"Channel information is locked"))
 
440
        self.mocker.replay()
 
441
        self.assertRaises(ChannelError, self.facade.reload_channels)
 
442
 
432
443
    def test_reset_add_get_channels(self):
433
444
 
434
445
        channels = [("alias0", {"type": "test"}),