Missing tests on API handlers (TypeError: 'list' object is not callable)
- Dominant language
- Python
- Stars
- 184
- Forks
- 41
- PR merge metrics
- No merged PRs in 30d
Description
The `_AtomsHandler` has a very minor (since it's not a commonly used API) bug in it, and the bug only exists because we're missing tests. Here's the bug:
```
[2015-12-30 14:59:41.995] 63523 ERROR MasterTornadoTh cluster_master_ Exception occurred during request to /v1/build/1/subjob/0/atom.
Traceback (most recent call last):
File "/Users/jharrington/.virtualenvs/clusterrunner/lib/python3.4/site-packages/tornado/web.py", line 1346, in _when_complete
callback()
File "/Users/jharrington/.virtualenvs/clusterrunner/lib/python3.4/site-packages/tornado/web.py", line 1367, in _execute_method
self._when_complete(method(*self.path_args, **self.path_kwargs),
File "/Users/jharrington/code/ClusterRunner/app/web_framework/cluster_master_application.py", line 171, in get
'atoms': [atom.api_representation() for atom in subjob.atoms()],
TypeError: 'list' object is not callable
[2015-12-30 14:59:41.995] 63523 ERROR MasterTornadoTh tornado.access 500 GET /v1/build/1/subjob/0/atom (127.0.0.1) 1.04ms
```
There's just an extraneous set of parentheses in the line:
``` python
'atoms': [atom.api_representation() for atom in subjob.atoms()]
```
It would have been easier to just fix the error than to type all this up, but I'm making this an issue ticket since I don't want to fix this without adding test coverage.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.