Test that process() successfully generates an answer when both user prompt and content are provided.
(dummy_node_for_process)
| 172 | |
| 173 | |
| 174 | def test_process_success(dummy_node_for_process): |
| 175 | """ |
| 176 | Test that process() successfully generates an answer when both user prompt and content are provided. |
| 177 | """ |
| 178 | state = { |
| 179 | "user_prompt": "What is the answer?", |
| 180 | "content": "This is some valid context.", |
| 181 | } |
| 182 | dummy_node_for_process.chain = DummyChain() |
| 183 | dummy_node_for_process.invoke_with_timeout = ( |
| 184 | lambda chain, inputs, timeout: chain.invoke(inputs) |
| 185 | ) |
| 186 | new_state = dummy_node_for_process.process(state) |
| 187 | assert new_state["output"] == {"content": "successful answer"} |
| 188 | |
| 189 | |
| 190 | def test_execute_timeout_single_chunk(dummy_node_with_pipe): |
nothing calls this directly
no test coverage detected