~ubuntu-branches/ubuntu/wily/ubuntu-release-upgrader/wily-proposed

« back to all changes in this revision

Viewing changes to tests/test_quirks.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-12-12 09:10:56 UTC
  • Revision ID: package-import@ubuntu.com-20141212091056-1br8c5vw5ri0ygse
Tags: 1:15.04.3
* add compatbility for vte 2.90 (and we need to keep that until
  16.04)
* remove quirk around kdegames-card-data-extra (no longer available
  in vivid)

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
        self.assertTrue(
171
171
            q._cpu_is_i686_and_has_cmov(testdir + "cpuinfo-via-c7m"))
172
172
 
173
 
    def test_kde_card_games_transition(self):
174
 
        # fake nothing is installed
175
 
        empty_status = tempfile.NamedTemporaryFile()
176
 
        apt_pkg.config.set("Dir::state::status", empty_status.name)
177
 
 
178
 
        # create quirks class
179
 
        controller = mock.Mock()
180
 
        config = mock.Mock()
181
 
        quirks = DistUpgradeQuirks(controller, config)
182
 
        # add cache to the quirks class
183
 
        cache = quirks.controller.cache = apt.Cache()
184
 
        # add mark_install to the cache (this is part of mycache normally)
185
 
        cache.mark_install = lambda p, s: cache[p].mark_install()
186
 
 
187
 
        # test if the quirks handler works when kdegames-card is not installed
188
 
        # does not try to install it
189
 
        self.assertFalse(cache["kdegames-card-data-extra"].marked_install)
190
 
        quirks._add_kdegames_card_extra_if_installed()
191
 
        self.assertFalse(cache["kdegames-card-data-extra"].marked_install)
192
 
 
193
 
        # mark it for install
194
 
        cache["kdegames-card-data"].mark_install()
195
 
        self.assertFalse(cache["kdegames-card-data-extra"].marked_install)
196
 
        quirks._add_kdegames_card_extra_if_installed()
197
 
        # verify that the quirks handler is now installing it
198
 
        self.assertTrue(cache["kdegames-card-data-extra"].marked_install)
199
 
 
200
173
    def test_screensaver_poke(self):
201
174
        # fake nothing is installed
202
175
        empty_status = tempfile.NamedTemporaryFile()