diff options
author | Heiner Lohaus <heiner.lohaus@netformic.com> | 2023-08-25 00:32:13 +0200 |
---|---|---|
committer | Heiner Lohaus <heiner.lohaus@netformic.com> | 2023-08-25 00:32:13 +0200 |
commit | 1f56c792220427b86ec7780a7a298d14f205b466 (patch) | |
tree | 896985034320f96df15475abd8c7a3d746d58919 /testing | |
parent | Improve provider list (diff) | |
download | gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.tar gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.tar.gz gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.tar.bz2 gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.tar.lz gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.tar.xz gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.tar.zst gpt4free-1f56c792220427b86ec7780a7a298d14f205b466.zip |
Diffstat (limited to '')
-rw-r--r-- | testing/test_providers.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/testing/test_providers.py b/testing/test_providers.py index 6d3b62d8..c4fcbc0c 100644 --- a/testing/test_providers.py +++ b/testing/test_providers.py @@ -16,16 +16,16 @@ def main(): if _provider.needs_auth: continue print("Provider:", _provider.__name__) - result = judge(_provider) + result = test(_provider) print("Result:", result) if _provider.working and not result: - failed_providers.append([_provider, result]) + failed_providers.append(_provider) print() if failed_providers: print(f"{Fore.RED}Failed providers:\n") - for _provider, result in failed_providers: + for _provider in failed_providers: print(f"{Fore.RED}{_provider.__name__}") else: print(f"{Fore.GREEN}All providers are working") @@ -61,12 +61,6 @@ def create_response(_provider: type[BaseProvider]) -> str: ) return "".join(response) - -def judge(_provider: type[BaseProvider]) -> bool: - if _provider.needs_auth: - return _provider.working - - return test(_provider) def test(_provider: type[BaseProvider]) -> bool: try: |