Finally fixed 400 by updating URLs, improved logging

This commit is contained in:
DarkCat09 2023-05-29 11:44:19 +04:00
parent 8ae655a34e
commit 4baf4ea1a7
17 changed files with 174 additions and 267 deletions

View file

@ -18,17 +18,12 @@ with mock:
)
mock.get(
f'{BASE_URL}/server/',
f'{BASE_URL}/server',
content=files.read_html('aternos_server1'),
)
mock.get(
f'{AJAX_URL}/status.php',
content=files.read_html('aternos_status'),
)
mock.post(
f'{AJAX_URL}/account/login.php',
f'{AJAX_URL}/account/login',
json={
'success': True,
'error': None,

View file

@ -1 +0,0 @@
{"brand":"aternos","status":0,"change":1667483582,"slots":20,"problems":0,"players":0,"playerlist":[],"message":{"text":"","class":"blue"},"dynip":null,"bedrock":false,"host":"","port":18713,"headstarts":null,"ram":0,"lang":"offline","label":"Offline","class":"offline","countdown":null,"queue":null,"id":"S0m3DGvTlbv8FfIM","name":"world35v","software":"Vanilla","softwareId":"NJcwtD9vj2X7udfa","type":"vanilla","version":"1.19.3","deprecated":false,"ip":"world35v.aternos.me","displayAddress":"world35v.aternos.me","motd":"\u00a77\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0433\u0440\u043e\u043a\u0430 \u00a79world35v\u00a77!","onlineMode":true,"icon":"fa-stop-circle","dns":{"type":"DEFAULT","domains":["world35v.aternos.me"],"host":null,"port":null}}

View file

@ -25,6 +25,7 @@ class TestHttp(unittest.TestCase):
at = Client()
at.login('test', '')
srv = at.account.list_servers(cache=False)[0]
srv.fetch()
self.assertEqual(
srv.subdomain,
'world35v',