summaryrefslogtreecommitdiffstats
path: root/tests/pyanaconda_test
diff options
context:
space:
mode:
authorAles Kozumplik <akozumpl@redhat.com>2011-07-27 14:03:49 +0200
committerAles Kozumplik <akozumpl@redhat.com>2011-07-28 08:34:08 +0200
commit8387584c5bfebb76ad68f86f51c643c74b8d1efd (patch)
tree7e2218265e233b8a4ccbb955f71ebf61e20c2a4e /tests/pyanaconda_test
parent8716be3c5374364adbfbe693b7711558b8a3871f (diff)
downloadanaconda-8387584c5bfebb76ad68f86f51c643c74b8d1efd.tar.gz
anaconda-8387584c5bfebb76ad68f86f51c643c74b8d1efd.tar.xz
anaconda-8387584c5bfebb76ad68f86f51c643c74b8d1efd.zip
dispatcher: allow requesting a step without insisting.
Introduces Dispatcher.request_steps_gently() which requests steps if they are not skipped already (i.e. "Unless there is a compelling reason, like a kickstart command, not to run this step, it must be run."). Resolves: rhbz#723798
Diffstat (limited to 'tests/pyanaconda_test')
-rw-r--r--tests/pyanaconda_test/dispatch_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pyanaconda_test/dispatch_test.py b/tests/pyanaconda_test/dispatch_test.py
index c84427ac4..57de69250 100644
--- a/tests/pyanaconda_test/dispatch_test.py
+++ b/tests/pyanaconda_test/dispatch_test.py
@@ -171,6 +171,18 @@ class DispatchTest(mock.TestCase):
self.assertFalse(d.step_enabled("complete"))
self.assertTrue(d.step_enabled("filtertype"))
+ def request_steps_gently_test(self):
+ from pyanaconda.errors import DispatchError
+ from pyanaconda.dispatch import Step
+ d = self._getDispatcher()
+ d.schedule_steps("betanag", "complete")
+ d.skip_steps("betanag")
+ self.assertRaises(DispatchError, d.request_steps, "betanag")
+ d.request_steps_gently("betanag")
+ d.request_steps_gently("complete")
+ self.assertEqual(d.steps["betanag"].sched, Step.SCHED_SKIPPED)
+ self.assertEqual(d.steps["complete"].sched, Step.SCHED_REQUESTED)
+
def track_scheduling_test(self):
from pyanaconda.dispatch import Step
d = self._getDispatcher()