From 4be5d4c3259b1f7a9e4dae18dd3ef69ef4a9c557 Mon Sep 17 00:00:00 2001 From: cs Date: Sat, 24 Feb 2024 12:02:12 +0000 Subject: [PATCH] Reorg code and tests DON'T use main.py --- .gitignore | 1 + .idea/ActiveCollabAPI.iml | 1 + .idea/runConfigurations/Integrationtests.xml | 20 ++++++ .idea/runConfigurations/Unittests.xml | 2 +- ActiveCollabAPI/ACAuthenticator.py | 27 +------- ActiveCollabAPI/ACTokenAuthenticator.py | 38 +++++------- ActiveCollabAPI/AcAccount.py | 12 ++++ ActiveCollabAPI/AcSession.py | 13 ++++ ActiveCollabAPI/AcToken.py | 6 ++ ActiveCollabAPI/AcUser.py | 9 +++ ActiveCollabAPI/ActiveCollab.py | 62 +++++++++++++++++++ Dockerfile | 2 +- integration_tests/__init__.py | 2 + integration_tests/test_Integration_AcLogin.py | 22 +++++++ main.py | 10 +-- test-config.json | 8 +++ tests/test_ACAuthenticator.py | 62 ++++++++++--------- tests/test_ACTokenAuthenticator.py | 59 ++++++++++++++++++ 18 files changed, 271 insertions(+), 85 deletions(-) create mode 100644 .idea/runConfigurations/Integrationtests.xml create mode 100644 ActiveCollabAPI/AcAccount.py create mode 100644 ActiveCollabAPI/AcSession.py create mode 100644 ActiveCollabAPI/AcToken.py create mode 100644 ActiveCollabAPI/AcUser.py create mode 100644 ActiveCollabAPI/ActiveCollab.py create mode 100644 integration_tests/__init__.py create mode 100644 integration_tests/test_Integration_AcLogin.py create mode 100644 test-config.json create mode 100644 tests/test_ACTokenAuthenticator.py diff --git a/.gitignore b/.gitignore index d708872..28dbaf8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ config.ini .venv/ __pycache__/ +config-mira.ini diff --git a/.idea/ActiveCollabAPI.iml b/.idea/ActiveCollabAPI.iml index ef1836e..b52f417 100644 --- a/.idea/ActiveCollabAPI.iml +++ b/.idea/ActiveCollabAPI.iml @@ -3,6 +3,7 @@ + diff --git a/.idea/runConfigurations/Integrationtests.xml b/.idea/runConfigurations/Integrationtests.xml new file mode 100644 index 0000000..675ce8b --- /dev/null +++ b/.idea/runConfigurations/Integrationtests.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Unittests.xml b/.idea/runConfigurations/Unittests.xml index ab865b6..0a85783 100644 --- a/.idea/runConfigurations/Unittests.xml +++ b/.idea/runConfigurations/Unittests.xml @@ -12,7 +12,7 @@