diff --git a/test.py b/test.py new file mode 100644 index 0000000..2427271 --- /dev/null +++ b/test.py @@ -0,0 +1,42 @@ +""" +Tool to quickly test if the endpoints input and output are still matching with the code. + +For not this script have just in mind to detect if some class have field that are missing or of invalid type. + +Usage: + OWNERID= PASSWORD= python test.py + +TODO: Add the ability to show if a field is missing but send by resonite API + +""" + +import os + +from resonitepy.client import Client +from resonitepy import classes + +client = Client() + +client.login( + classes.LoginDetails( + ownerId=os.environ.get('OWNERID'), + authentication=classes.LoginDetailsAuth(password=os.environ.get('PASSWORD')), + ) +) + +errors = [] + +try: + platform = client.platform() +except Exception as exc: + errors.append( + { + "class": "Plaform", + "error": str(exc) + } + ) + +for error in errors: + print(f"Class {error['class']}") + print(f" {error['error']}") +