def create_score(username, score): user = User.objects.create_user(username, username + '@example.pl', username) result = UserResultForProblem() result.user = user result.problem_instance = pis result.status = 'OK' result.score = IntegerScore(score) result.save() return user
def create_score(username, score): user = User.objects.create_user(username, username + '@example.pl', username) result = UserResultForProblem() result.user = user result.problem_instance = pis result.status = 'OK' result.score = 'int:%s' % score result.save() return user