def test_install_hook(self): self.test_config.set('openstack-origin', 'cloud:precise-havana') hooks.install() self.configure_installation_source.assert_called_with( 'cloud:precise-havana', ) self.assertTrue(self.apt_update.called) self.apt_install.assert_called_with(PACKAGES, fatal=True) self.assertTrue(self.execd_preinstall.called)