Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
 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()