Skip to content

Commit aecb0be

Browse files
committed
fixed tests
1 parent fdf3d71 commit aecb0be

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

src/hackingBuddyGPT/utils/prompt_generation/prompts/task_planning/tree_of_thought_prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,4 +309,4 @@ def get_documentation_steps(self):
309309
]
310310

311311
def generate_documentation_steps(self, steps):
312-
return self.generate_documentation_steps(steps)
312+
return self.get_documentation_steps()

tests/test_prompt_engineer_documentation.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,22 @@ def setUp(self):
3737
def test_in_context_learning_no_hint(self):
3838
prompt_engineer = self.generate_prompt_engineer("icl")
3939

40-
expected_prompt = """Based on this information :
41-
42-
Objective: Identify all accessible endpoints via GET requests for https://jsonplaceholder.typicode.com/. See https://jsonplaceholder.typicode.com/
43-
Query root-level resource endpoints.
44-
Find root-level endpoints for https://jsonplaceholder.typicode.com/.
45-
Only send GET requests to root-level endpoints with a single path component after the root. This means each path should have exactly one '/' followed by a single word (e.g., '/users', '/products').
46-
1. Send GET requests to new paths only, avoiding any in the lists above.
47-
2. Do not reuse previously tested paths.
48-
"""
40+
expected_prompt = ('Based on this information :\n'
41+
'\n'
42+
'Objective: Identify all accessible endpoints via GET requests for '
43+
'https://jsonplaceholder.typicode.com/. See '
44+
'https://jsonplaceholder.typicode.com/\n'
45+
' Query root-level resource endpoints.\n'
46+
' Find root-level endpoints for '
47+
'https://jsonplaceholder.typicode.com/.\n'
48+
' Only send GET requests to root-level '
49+
'endpoints with a single path component after the root. This means each path '
50+
"should have exactly one '/' followed by a single word (e.g., '/users', "
51+
"'/products'). \n"
52+
' 1. Send GET requests to new paths '
53+
'only, avoiding any in the lists above.\n'
54+
' 2. Do not reuse previously tested '
55+
'paths.\n')
4956
actual_prompt = prompt_engineer.generate_prompt(hint="", turn=1)
5057

5158

0 commit comments

Comments
 (0)