aboutsummaryrefslogtreecommitdiff
path: root/autogpts/autogpt/tests/mocks
diff options
context:
space:
mode:
Diffstat (limited to 'autogpts/autogpt/tests/mocks')
-rw-r--r--autogpts/autogpt/tests/mocks/__init__.py0
-rw-r--r--autogpts/autogpt/tests/mocks/mock_commands.py29
2 files changed, 29 insertions, 0 deletions
diff --git a/autogpts/autogpt/tests/mocks/__init__.py b/autogpts/autogpt/tests/mocks/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/autogpts/autogpt/tests/mocks/__init__.py
diff --git a/autogpts/autogpt/tests/mocks/mock_commands.py b/autogpts/autogpt/tests/mocks/mock_commands.py
new file mode 100644
index 000000000..ab9e961b6
--- /dev/null
+++ b/autogpts/autogpt/tests/mocks/mock_commands.py
@@ -0,0 +1,29 @@
+from autogpt.command_decorator import command
+from autogpt.core.utils.json_schema import JSONSchema
+
+COMMAND_CATEGORY = "mock"
+
+
+@command(
+ "function_based_cmd",
+ "Function-based test command",
+ {
+ "arg1": JSONSchema(
+ type=JSONSchema.Type.INTEGER,
+ description="arg 1",
+ required=True,
+ ),
+ "arg2": JSONSchema(
+ type=JSONSchema.Type.STRING,
+ description="arg 2",
+ required=True,
+ ),
+ },
+)
+def function_based_cmd(arg1: int, arg2: str) -> str:
+ """A function-based test command.
+
+ Returns:
+ str: the two arguments separated by a dash.
+ """
+ return f"{arg1} - {arg2}"