diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-01-23 12:17:16 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-01-23 12:17:16 +0100 |
commit | e4f743881c915ba250b859d01ef78c7b90a96bf5 (patch) | |
tree | 22e1897967212a209751880cd6f9e3bac82bb9d9 /etc/unittest/main.py | |
parent | Check for comments in copilot (diff) | |
download | gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.tar gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.tar.gz gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.tar.bz2 gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.tar.lz gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.tar.xz gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.tar.zst gpt4free-e4f743881c915ba250b859d01ef78c7b90a96bf5.zip |
Diffstat (limited to '')
-rw-r--r-- | etc/unittest/main.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/etc/unittest/main.py b/etc/unittest/main.py index 9b9ca011..f5eb5138 100644 --- a/etc/unittest/main.py +++ b/etc/unittest/main.py @@ -1,4 +1,3 @@ -from .include import DEFAULT_MESSAGES import unittest import asyncio import g4f @@ -6,6 +5,8 @@ from g4f import ChatCompletion, get_last_provider from g4f.Provider import RetryProvider from .mocks import ProviderMock +DEFAULT_MESSAGES = [{'role': 'user', 'content': 'Hello'}] + class NoTestChatCompletion(unittest.TestCase): def no_test_create_default(self): @@ -31,7 +32,4 @@ class TestGetLastProvider(unittest.TestCase): def test_get_last_provider_async(self): coroutine = ChatCompletion.create_async(g4f.models.default, DEFAULT_MESSAGES, ProviderMock) asyncio.run(coroutine) - self.assertEqual(get_last_provider(), ProviderMock) - -if __name__ == '__main__': - unittest.main()
\ No newline at end of file + self.assertEqual(get_last_provider(), ProviderMock)
\ No newline at end of file |