← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~abentley/lazr.jobrunner/fix-celeryd-tests into lp:lazr.jobrunner

 

Aaron Bentley has proposed merging lp:~abentley/lazr.jobrunner/fix-celeryd-tests into lp:lazr.jobrunner.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~abentley/lazr.jobrunner/fix-celeryd-tests/+merge/99378

This branch fixes the celeryd tests, which use FileJob.  RunFileJob instances require file_job_dir to be set correctly, which is done for celeryd using CELERY_ANNOTATIONS.  This mechanism sets class variables, not instance variables.  My recent landings provided file_job_dir as an instance variable, so it overrode the value set by CELERY_ANNOTATIONS.  This branch fixes the tests by declaring file_job_dir as a class variable.
-- 
https://code.launchpad.net/~abentley/lazr.jobrunner/fix-celeryd-tests/+merge/99378
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/lazr.jobrunner/fix-celeryd-tests into lp:lazr.jobrunner.
=== modified file 'src/lazr/jobrunner/tests/test_celerytask.py'
--- src/lazr/jobrunner/tests/test_celerytask.py	2012-03-22 18:02:23 +0000
+++ src/lazr/jobrunner/tests/test_celerytask.py	2012-03-26 17:18:19 +0000
@@ -171,8 +171,7 @@
 
     name = 'run_file_job'
 
-    def __init__(self):
-        self.file_job_dir = None
+    file_job_dir = None
 
     @property
     def job_source(self):