Mark test test_generate_aiconfig_automatic_typical as @requires_api_… (#2981)
* Mark test test_generate_aiconfig_automatic_typical as @requires_api_key("OPENAI_API_KEY") * missing importpull/2982/head
parent
bc354a3df6
commit
bb786461c7
|
@ -8,6 +8,7 @@ from autogpt.setup import (
|
|||
generate_aiconfig_manual,
|
||||
prompt_user,
|
||||
)
|
||||
from tests.utils import requires_api_key
|
||||
|
||||
|
||||
class TestAutoGPT(unittest.TestCase):
|
||||
|
@ -22,6 +23,7 @@ class TestAutoGPT(unittest.TestCase):
|
|||
self.assertGreaterEqual(len(ai_config.ai_goals), 1)
|
||||
self.assertLessEqual(len(ai_config.ai_goals), 5)
|
||||
|
||||
@requires_api_key("OPENAI_API_KEY")
|
||||
def test_generate_aiconfig_automatic_typical(self):
|
||||
user_prompt = "Help me create a rock opera about cybernetic giraffes"
|
||||
ai_config = generate_aiconfig_automatic(user_prompt)
|
||||
|
|
Loading…
Reference in New Issue