Commit Graph

4 Commits

Author SHA1 Message Date
reformat
787e762445 tests: Run python formatter (black) for topotests
Mostly ' => ", whitespace changes.

Using https://github.com/psf/black

Signed-off-by: reformat <reformat@nobody.nobody>
2020-04-03 19:41:28 +03:00
Rafael Zalamena
3e379f6e49 topotests: fix json_cmp wrong list handling
Don't quit on the first match. While here add some more `json_cmp` tests
to make sure this doesn't happen again.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-27 20:22:14 -05:00
Rafael Zalamena
dc0d3fc53f topotest: add JSON list comparation support
Add missing list support for json_cmp(). The missing support was
noticed while writing the BGP ECMP topology test.
2018-11-27 20:22:11 -05:00
Rafael Zalamena
09e21b4487 topotest: implement json_cmp function
Implemented a JSON compare function that tells you when a specific
subset of items exist or not inside a JSON dataset.

More details can be found in the function docstring or in the test file
lib/test_json.py.
2018-11-27 20:22:11 -05:00