Closed daira closed 10 years ago
ack'd
/me runs
git pull --verbose github_leastauthority.com
./runtests.sh
daira what commit did these tests fail on?
I ran against: 28d900c6d3396709d89d9995ced40372d5cf59a6
and got no failures.
Also the test failures look like they use an older version of the test vector.
Yes, because on my machine, ../secret_config/lae_automation_config.json
randomly happened to be an older version of the config. The tests shouldn't be reading from there!
Understood.
I'm having some difficulty with this.
I mv'd the repo to check for spurious access to files outside leastauthority.com. I get the IOError showing the bug as expected.
When I attempt to patch out the reference to lae_automation.config.Config and replace it with a MockObject, the actual object is still referenced.
By examining the traceback I see that handlers/init.py is evaluated. I'm not sure why that is.
(LeastAuthority_env) 0 git_branch: master
/home/arc/LeastAuthority_env/LeastAuthority/website/buffer_directory/leastauthority.com :
$ trial lae_site.handlers.test.test_submit_subscription
lae_site.handlers
test
test_submit_subscription ... [ERROR]
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/home/arc/LeastAuthority_env/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 588, in loadByNames
things.append(self.findByName(name))
File "/home/arc/LeastAuthority_env/local/lib/python2.7/site-packages/twisted/trial/runner.py", line 398, in findByName
return reflect.namedAny(name)
File "/home/arc/LeastAuthority_env/local/lib/python2.7/site-packages/twisted/python/_reflectpy3.py", line 266, in namedAny
topLevelPackage = _importAndCheckStack(trialname)
File "/home/arc/LeastAuthority_env/local/lib/python2.7/site-packages/twisted/python/_reflectpy3.py", line 205, in _importAndCheckStack
return __import__(importName)
File "/home/arc/LeastAuthority_env/LeastAuthority/website/buffer_directory/leastauthority.com/lae_site/handlers/__init__.py", line 9, in <module>
from lae_site.handlers.submit_subscription import SubmitSubscriptionHandler
File "/home/arc/LeastAuthority_env/LeastAuthority/website/buffer_directory/leastauthority.com/lae_site/handlers/submit_subscription.py", line 13, in <module>
config = Config()
File "/home/arc/LeastAuthority_env/LeastAuthority/website/buffer_directory/leastauthority.com/lae_automation/config.py", line 14, in __init__
config = self._load_config_json(configFile)
File "/home/arc/LeastAuthority_env/LeastAuthority/website/buffer_directory/leastauthority.com/lae_automation/config.py", line 33, in _load_config_json
configFile = open(configFile, 'r')
exceptions.IOError: [Errno 2] No such file or directory: '../secret_config/lae_automation_config.json'
lae_site.handlers.test.test_submit_subscription
-------------------------------------------------------------------------------
Ran 1 tests in 0.001s
FAILED (errors=1)
To close this issue, run the unittests on a leastauthority.com 0eff1af repo, that is in a directory isolated from "sisters" e.g. secret_config.
If your tests pass, then you can close the issue.
LGTM.