bifrostlab / llm-assistant

Multifunctional LLM Assistant for Discord
8 stars 6 forks source link

Write a suite of functional tests for the Discordbot #4

Closed nqngo closed 6 months ago

nqngo commented 8 months ago

Create a suite of functional tests to test the Discordbot functionality. You can write the tests without writing the codes first and aid the dev team with their development.

Essentially you already know the input and output, use mock, asyncio, and pytest to create a test of functional tests for the codes.

For example, imagine the following command get called:

/ask model:gpt4 prompt:"What is the capital of France?"

The LLMBot will watch for the slash command into the main function and call the hypothetical following function:

main --> prompt_gpt4(string)

You can write the set of functional testing that the prompt_gpt4 will get call and return a set of string with the answers to simulate the user experience.

samhwang commented 6 months ago

This is already covered by #58