pybatfish
pybatfish copied to clipboard
bf_auto_complete doctest fails
Example code for bf_auto_complete (if tested with doctest) results in the following exception:
UNEXPECTED EXCEPTION: BatfishException('Coordinator returned failure: Snapshot name should be supplied')
Traceback (most recent call last):
File "/Users/victor/anaconda3/envs/batfish/lib/python3.7/doctest.py", line 1329, in __run
compileflags, 1), test.globs)
File "<doctest pybatfish.client.commands.bf_auto_complete[3]>", line 1, in <module>
File "/Users/victor/git-workspace/pybatfish/pybatfish/client/commands.py", line 154, in bf_auto_complete
jsonData)
File "/Users/victor/git-workspace/pybatfish/pybatfish/client/resthelper.py", line 70, in get_json_response
"Coordinator returned failure: {}".format(json_response[1]))
pybatfish.exception.BatfishException: Coordinator returned failure: Snapshot name should be supplied
To reproduce:
- start batfish
- un-skip the test by removing
# doctest: +SKIP - run
pytest pybatfish --doctest-modules