def save_content(self, player_list):
     # future_list = list()
     # for player_prop in player_list:
     #     future_list.append(Player.update_insert_record(player_prop))
     # ndb.Future.wait_all(future_list)
     Player.overwrite_all(player_list)
     return len(Player.query().fetch())
Exemple #2
0
 def save_content(self, player_list):
     # future_list = list()
     # for player_prop in player_list:
     #     future_list.append(Player.update_insert_record(player_prop))
     # ndb.Future.wait_all(future_list)
     Player.overwrite_all(player_list)
     return len(Player.query().fetch())
 def test_overwrite_players(self):
     Player.overwrite_all([player_two])
     players = Player.query().fetch()
     self.assertEqual(len(players), 1, "Expect %s players. Got %s." % (1, len(players)))
     self.assertEqual(players[0].name, player_two['name'])