core: better annimations
This commit is contained in:
parent
617b67df24
commit
22ff3d58d3
@ -5,7 +5,7 @@ from tests.utils import test
|
||||
def test_accounts_register(client, username, password):
|
||||
print ("REGISTER")
|
||||
|
||||
test(client.accounts.create(username, password), b'ok: user added', 'normal', None)
|
||||
test(client.accounts.create, (username, password), b'ok: user added', 'normal', None)
|
||||
|
||||
print()
|
||||
|
||||
@ -13,7 +13,7 @@ def test_accounts_login(client, username, password):
|
||||
|
||||
print ("LOGIN")
|
||||
|
||||
test(client.login(username, password), b'ok: account valid', "normal", None)
|
||||
test(client.login, (username, password), b'ok: account valid', "normal", None)
|
||||
|
||||
print()
|
||||
|
||||
@ -21,7 +21,7 @@ def test_accounts_delete(client):
|
||||
|
||||
print ("DELETE")
|
||||
|
||||
test(client.accounts.delete(), b'ok: account has been deleted', 'normal')
|
||||
test(client.accounts.delete, (), b'ok: account has been deleted', 'normal')
|
||||
|
||||
print()
|
||||
|
||||
|
@ -10,7 +10,7 @@ def test_profiles_get(client):
|
||||
|
||||
print ("GET")
|
||||
|
||||
test(client.profiles.get(1), Profile(username="997e13f5-474d-4fea-b55a-ad8a27b9534b", title=""), "normal")
|
||||
test(client.profiles.get, (1, ), Profile(username="997e13f5-474d-4fea-b55a-ad8a27b9534b", title=""), "normal")
|
||||
|
||||
print()
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
def test(value, expected_value, title, description = None):
|
||||
def test(func: callable, params, expected_value, title: str, description = None):
|
||||
print(title, end=" ")
|
||||
if (value == expected_value):
|
||||
if (func(*params) == expected_value):
|
||||
print("[OK]")
|
||||
return
|
||||
print ("[ERROR]")
|
||||
|
Loading…
Reference in New Issue
Block a user