def generateExampleEntry(db, exampleProblem=EXAMPLE_PROBLEM, exampleUser=EXAMPLE_USER):
exampleUser = copy.deepcopy(exampleUser)
exampleProblem = copy.deepcopy(exampleProblem)
if db.user.find_one(exampleUser) is None:
db.user.insert_one(exampleUser)
if db.problem.find_one(exampleProblem) is None:
db.problem.insert_one(exampleProblem)
return {"problemID": str(exampleProblem["_id"]), "userID": str(exampleUser["_id"]), "score": "12"}
评论列表
文章目录