Skip to content

Commit

Permalink
fixed a few unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Fiers committed Sep 13, 2012
1 parent 58a68be commit 89c25e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/python/moa/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ def newTestJob(template, title="Test job", provider=None):
for testing purposes - creates a temporary directory and uses that to
instantiate a job. This function returns the job object created
>>> job = newTestJob(template = 'adhoc', title='test title')
>>> job = newTestJob(template = 'simple', title='test title')
>>> assert(isinstance(job, Job))
>>> assert(os.path.exists(job.wd))
>>> assert(job.conf.title == 'test title')
>>> assert(os.path.exists(os.path.join(job.wd, '.moa')))
>>> assert(os.path.exists(os.path.join(job.wd, '.moa', 'template')))
>>> assert(job.template.name == 'adhoc')
>>> assert(job.template.name == 'simple')
:returns: the created job
:rtype: instance of :class:`moa.job.Job`
Expand Down Expand Up @@ -464,8 +464,8 @@ def setTemplate(self, name, provider=None):
Set a new template for this job
>>> job = newTestJob('unittest')
>>> job.setTemplate('adhoc')
>>> afile = os.path.join(job.confDir, 'template.d', 'adhoc.mk')
>>> job.setTemplate('simple')
>>> afile = os.path.join(job.confDir, 'template.d', 'simple.jinja2')
>>> assert(os.path.exists(afile))
"""
self.checkConfDir()
Expand Down

0 comments on commit 89c25e8

Please sign in to comment.