예제 #1
0
파일: views.py 프로젝트: lovejees/Python
def getshortestpath():
    src = int(request.args.get('emp1'))
    des = int(request.args.get('emp2'))

    list1 = Employee.getancestorpath(src)
    list2 = Employee.getancestorpath(des)

    shortpath = GraphUtil.shortestpath(list1, list2, src, des)
    return jsonify(shortpath)
예제 #2
0
 def test_getancestorpath(self, client):
     result = Employee.getancestorpath(DUMMY_ID)
     assert_result_is_dictionary(result, list)