예제 #1
0
 def appear_token(self):
     Global.data = client.createLobby(Global.players_amount,
                                      Global.spy_amount)
     Global.token = Global.data[0]
     self.token_layout.token_button.font_size = 60
     self.token_layout.token_button.texture_update()
     self.token_layout.token_button.text = Global.token
     self.play_button_layout.play_button.disabled = False
     Playground_Screen = PlaygroundScreen(name='playground')
     sm.add_widget(Playground_Screen)
예제 #2
0
def test_isCorrectToken():
    data = client.createLobby(5, 2)
    checker = client.connect('I drunk AF')
    assert checker == 'invalid token'
예제 #3
0
def test_checkGameStatus():
    data = client.createLobby(5, 2)
    client.checkLocation(data[0], data[2])
    checker = client.checkGameStatus(data[0])
    assert checker == 'false'
예제 #4
0
def test_checkLocation():
    data = client.createLobby(5, 2)
    checker = client.checkLocation(data[0], data[2])
    assert checker == 'true'
예제 #5
0
def test_createLobby():
    data = client.createLobby(5, 2)
    assert len(data[0]) == 4
    assert data[1] in ['spy', 'peaceful']
    assert data[2] in database
    assert data[3] == database