| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from dotenv import load_dotenv |
||
|
|
|||
| 2 | import unittest |
||
| 3 | import os |
||
| 4 | |||
| 5 | class UT_envCheck(unittest.TestCase): |
||
| 6 | |||
| 7 | @staticmethod |
||
| 8 | def test_env(): |
||
| 9 | success= load_dotenv() |
||
| 10 | if not success: |
||
| 11 | raise ImportError("Credential .env NOT FOUND! Please ensure .env is set with all the necessary credentials!") |
||
| 12 | |||
| 13 | |||
| 14 | assert os.getenv("LORISurl") is not None |
||
| 15 | assert os.getenv("LORISusername") is not None |
||
| 16 | assert os.getenv("LORISpassword") is not None |
||
| 17 | |||
| 18 | assert os.getenv("timepoint_prefix") is not None |
||
| 19 | assert os.getenv("projectID_dictionary") is not None |
||
| 20 | assert os.getenv("LocalDatabase") is not None |
||
| 21 | |||
| 22 | assert os.getenv("OrthancURL") is not None |
||
| 23 | |||
| 24 | assert os.getenv("ProxyIP") is not None |
||
| 25 | assert os.getenv("ProxyUsername") is not None |
||
| 26 | assert os.getenv("ProxyPassword") is not None |
||
| 27 | |||
| 28 | assert os.getenv("LORISHostPassword") is not None |
||
| 29 | assert os.getenv("LORISHostUsername") is not None |
||
| 30 | assert os.getenv("LORISHostIP") is not None |
||
| 31 | |||
| 32 | assert os.getenv("DeletionScript") is not None |
||
| 33 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.