pybatfish icon indicating copy to clipboard operation
pybatfish copied to clipboard

bf_auto_complete doctest fails

Open progwriter opened this issue 6 years ago • 0 comments

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:

  1. start batfish
  2. un-skip the test by removing # doctest: +SKIP
  3. run pytest pybatfish --doctest-modules

progwriter avatar Jun 27 '19 17:06 progwriter