~ubuntu-branches/ubuntu/trusty/landscape-client/trusty-proposed

« 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-07 16:27:45 UTC
  • mfrom: (1.1.14 upstream) (24.1.1 karmic-proposed)
  • Revision ID: james.westby@ubuntu.com-20100407162745-oeyoppvl0qyvii55
Tags: 1.5.0-0ubuntu0.10.04.0
* 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: #522688)

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"}),