Nir Soffer has uploaded a new change for review. Change subject: tests: Test default Job.progress implementation ......................................................................
tests: Test default Job.progress implementation Test jobs.Job.progress, and add ProgressingJob class for testing job that report a progress. Change-Id: I8c129a53d95cd856c4a4dadaefa72bc17888ba66 Signed-off-by: Nir Soffer <[email protected]> --- M tests/jobsTests.py 1 file changed, 12 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/51213/1 diff --git a/tests/jobsTests.py b/tests/jobsTests.py index 2420d55..7f86ba4 100644 --- a/tests/jobsTests.py +++ b/tests/jobsTests.py @@ -29,12 +29,7 @@ def __init__(self): jobs.Job.__init__(self, str(uuid.uuid4())) - self._progress = None self._aborted = False - - @property - def progress(self): - return self._progress def _abort(self): self._aborted = True @@ -46,6 +41,17 @@ class BarJob(TestingJob): _JOB_TYPE = 'bar' + + +class ProgressingJob(TestingJob): + + def __init__(self): + TestingJob.__init__(self) + self._progress = None + + @property + def progress(self): + return self._progress @expandPermutations @@ -174,10 +180,9 @@ jobs.delete('foo')) def test_job_get_progress(self): - job = TestingJob() + job = ProgressingJob() # Job queued or initializing, no progress yet - self._progress = None self.assertNotIn('progress', job.info()) # Job running -- To view, visit https://gerrit.ovirt.org/51213 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8c129a53d95cd856c4a4dadaefa72bc17888ba66 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
