def get_json(module):
    from reggae.reflect import get_build, get_default_options, get_dependencies
    build = get_build(module)
    default_opts = get_default_options(module)
    opts_json = {} if default_opts is None else default_opts.jsonify()
    ret = {'version': 1,
           'defaultOptions': opts_json,
           'dependencies': get_dependencies(module.__file__),
           'build': build.jsonify()}

    return json.dumps(ret)
def test_get_deps():
    my_dir = os.path.dirname(os.path.realpath(__file__))
    my_path = os.path.join(my_dir, __name__ + ".py")
    assert get_dependencies(my_path) == [os.path.join(my_dir, "foo.py")]