Skip to content

Commit e34c081

Browse files
Update tests
1 parent 189c969 commit e34c081

File tree

4 files changed

+72435
-2
lines changed

4 files changed

+72435
-2
lines changed

tests/protocols/test_satisfactory.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import os
22

33
import pytest
4-
54
from opengsq.protocols.satisfactory import Satisfactory
65

76
from .result_handler import ResultHandler
87

98
handler = ResultHandler(os.path.basename(__file__)[:-3])
10-
handler.enable_save = True
9+
# handler.enable_save = True
1110

1211
# Satisfactory
1312
test = Satisfactory(host='delta3.ptse.host', port=15777)

tests/protocols/test_scum.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os
2+
3+
import pytest
4+
from opengsq.protocols.scum import Scum
5+
6+
from .result_handler import ResultHandler
7+
8+
handler = ResultHandler(os.path.basename(__file__)[:-3])
9+
# handler.enable_save = True
10+
11+
# Scum
12+
test = Scum(host='15.235.181.19', port=7042)
13+
14+
@pytest.mark.asyncio
15+
async def test_get_status():
16+
result = await test.get_status()
17+
await handler.save_result('test_get_status', result)
18+
19+
@pytest.mark.asyncio
20+
async def test_query_master_servers():
21+
result = await test.query_master_servers()
22+
await handler.save_result('test_query_master_servers', result)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"ip": "15.235.181.19",
3+
"port": 7042,
4+
"name": "#2549★专享服★PVPVE★5倍长久稳定★新人/小队礼包★野外禁雷★",
5+
"numplayers": 23,
6+
"maxplayers": 98,
7+
"time": 19,
8+
"password": false,
9+
"version": "0.8.520.69417"
10+
}

0 commit comments

Comments
 (0)