MCPcopy Create free account
hub / github.com/bitswired/rustgpt / test_json

Function test_json

src/data/repository.rs:195–206  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

193
194 #[tokio::test]
195 async fn test_json() {
196 let (pool, repo, user_id) = setup().await;
197 let chat = repo.create_chat(user_id, "test", "gpt-4").await;
198 assert!(chat.is_ok(), "Failed to create chat");
199 let chat_id = chat.unwrap();
200
201 let message_block = repo.add_message_block(chat_id, "Test").await;
202 assert!(message_block.is_ok(), "Failed to add message_block");
203
204 let chat_message_pairs = repo.retrieve_chat(chat_id).await;
205 print!("{:#?}", chat_message_pairs)
206 }
207}

Callers

nothing calls this directly

Calls 4

setupFunction · 0.85
create_chatMethod · 0.80
add_message_blockMethod · 0.80
retrieve_chatMethod · 0.80

Tested by

no test coverage detected