Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_render_json_tree():
output = render_json_tree(tree, indent=4)
data = json.loads(output)
# @TODO: This test fails on travis because gnureadline doesn't
# appear as a dependency of ipython (which it is)
#
# ignored_pkgs = {'pip', 'pipdeptree', 'setuptools', 'wheel'}
# pkg_keys = set([d['key'].lower() for d in data
# if d['key'].lower() not in ignored_pkgs])
# expected = {'alembic', 'flask-script', 'ipython',
# 'lookupy', 'psycopg2', 'redis', 'slugify'}
# assert pkg_keys - expected == set()
matching_pkgs = [p for p in data if p['key'] == 'flask-script']
assert matching_pkgs
flask_script = matching_pkgs[0]