コード例 #1
0
ファイル: test_views.py プロジェクト: lappis-unb/UnBGames
    def test_game_list_content(self, client):
        GameFactory.create_batch(3)
        GameFactory(game_activated=False)

        gameList = Game.objects.exclude(game_activated=False)
        response = client.get('/api/games/')

        assert gameList.count() == len(response.data)
コード例 #2
0
ファイル: test_views.py プロジェクト: lappis-unb/UnBGames
def list_games(num_games=2):
    return GameFactory.create_batch(num_games)