def setUpTestData(cls): cls.user = User.objects.create_user('test', '*****@*****.**', 'password') cls.user.is_staff = True cls.user.save() cls.game = models.Game(id=1, name='test') cls.game.save()
def _associate_game_as_level_num(self, level_num=1, user=None, game=None): if game is None: game = self.game if user is None: user = self.user models.LevelAttempt(user=user, game=game, level_number=level_num).save() models.Game(name='Wrong').save()
def setUpTestData(cls): cls.user1 = User.objects.create_user('test', '*****@*****.**', 'password') cls.user1.save() cls.user2 = User.objects.create_user('test2', '*****@*****.**', 'password') cls.user2.save() cls.game = models.Game(id=1, name='test', public=False) cls.game.save()