diff --git a/src/tests.py b/src/tests.py new file mode 100644 index 0000000..2fd86ca --- /dev/null +++ b/src/tests.py @@ -0,0 +1,31 @@ +import Client +from urls import * + +from uuid import uuid4 + +def test(value, expected_value, title, description): + if (value == expected_value): + print(title, "[OK]") + return + print (title, "[ERROR]") + print ("expected", expected_value, ", got", value) + if not description is None: + print (description) + +def test_accounts_register(): + username = uuid4() + password = uuid4() + + client = Client.Client("http://0.0.0.0:8000/") + + print ("REGISTER") + + test(client.register(username, password), b'ok: user added', 'normal register', None) + + print() + +def tests(): + test_accounts_register() + +if __name__ == "__main__": + tests() \ No newline at end of file diff --git a/tests/accounts/login.py b/tests/accounts/login.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/accounts/register.py b/tests/accounts/register.py deleted file mode 100644 index bd3ce71..0000000 --- a/tests/accounts/register.py +++ /dev/null @@ -1,10 +0,0 @@ -from unittest import TestCase -import uuid - -class RegisterTest(TestCase): - - def setUp(self): - self.username: str = uuid.uuid4() - self.password: str = uuid.uuid4() - - def test_valid \ No newline at end of file