GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 17-19 lines in 2 locations

tests/unit_tests/conftest.py 2 locations

@@ 34-52 (lines=19) @@
31
    request.addfinalizer(fin)
32
    return conn
33
34
35
@pytest.fixture
36
def mock_game_connection(state=GameConnectionState.INITIALIZING, player=None):
37
    gc = mock.create_autospec(spec=GameConnection)
38
    gc.state = state
39
    gc.player = player
40
    return gc
41
42
43
@pytest.fixture()
44
def game_stats_service():
45
    service = mock.Mock(spec=GameStatsService)
46
    service.process_game_stats = CoroMock()
47
    return service
48
49
50
@pytest.fixture
51
def connections(loop, player_service, game_service, transport, game):
52
    from server import GameConnection
53
54
    def make_connection(player, connectivity):
55
        lc = LobbyConnection(loop)
@@ 15-31 (lines=17) @@
12
        sendJSON=lambda obj: None
13
    )
14
15
16
@pytest.fixture
17
def game_connection(request, game, loop, player_service, players, game_service, transport):
18
    from server import GameConnection, LobbyConnection
19
    conn = GameConnection(loop=loop,
20
                          lobby_connection=mock.create_autospec(LobbyConnection(loop)),
21
                          player_service=player_service,
22
                          games=game_service)
23
    conn._transport = transport
24
    conn.player = players.hosting
25
    conn.game = game
26
    conn.lobby = mock.Mock(spec=LobbyConnection)
27
28
    def fin():
29
        conn.abort()
30
31
    request.addfinalizer(fin)
32
    return conn
33
34