Example #1
0
    def test_remove_game_data(self):

        self.assertEqual(heroes_models.Hero.objects.count(), 1)

        remove_game_data(self.account)

        self.assertEqual(heroes_models.Hero.objects.count(), 0)
Example #2
0
    def test_remove_game_data(self):

        self.assertEqual(heroes_models.Hero.objects.count(), 1)

        remove_game_data(self.account)

        self.assertEqual(heroes_models.Hero.objects.count(), 0)
Example #3
0
    def test_remove_game_data(self):

        self.assertEqual(heroes_models.Hero.objects.count(), 1)

        remove_game_data(AccountPrototype.get_by_id(self.account_id))

        self.assertEqual(heroes_models.Hero.objects.count(), 0)
Example #4
0
    def test_remove_game_data(self):

        self.assertEqual(HeroPrototype._db_count(), 1)

        remove_game_data(AccountPrototype.get_by_id(self.account_id))

        self.assertEqual(HeroPrototype._db_count(), 0)
Example #5
0
def remove_account(account, force=False):
    from the_tale.game.logic import remove_game_data
    if force or account.can_be_removed():
        with transaction.atomic():
            remove_game_data(account)
            account.remove()
Example #6
0
def remove_account(account):
    from the_tale.game.logic import remove_game_data
    if account.can_be_removed():
        with transaction.atomic():
            remove_game_data(account)
            account.remove()