171
171
q._cpu_is_i686_and_has_cmov(testdir + "cpuinfo-via-c7m"))
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)
178
# create quirks class
179
controller = 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()
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)
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)
200
173
def test_screensaver_poke(self):
201
174
# fake nothing is installed
202
175
empty_status = tempfile.NamedTemporaryFile()