Пример #1
0
 def test_get_best(self):
     """ Best score should be kept """
     save_score(11)
     best = get_best()
     self.assertTrue(best ==11)
     save_score(15)
     best = get_best()
     self.assertTrue(best ==15)
     save_score(2)
     best = get_best()
     self.assertTrue(best ==15)
Пример #2
0
def api_best_score():
    score = get_best()
    return jsonify( {"score" : str(score)} )