Commit ·
ef894d2
1
Parent(s): 191e0af
feature(#74): update test api to test deleting data api...
Browse files
Brain/tests/functional/test_api.py
CHANGED
|
@@ -209,3 +209,29 @@ def test_chat_rising(body):
|
|
| 209 |
def test_train_contacts(body):
|
| 210 |
response = client.post("/train/contacts", json=body)
|
| 211 |
assert response.status_code == 200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
def test_train_contacts(body):
|
| 210 |
response = client.post("/train/contacts", json=body)
|
| 211 |
assert response.status_code == 200
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
@pytest.mark.parametrize(
|
| 215 |
+
"body",
|
| 216 |
+
[
|
| 217 |
+
(
|
| 218 |
+
{
|
| 219 |
+
"data": {
|
| 220 |
+
"reference_link": "test link",
|
| 221 |
+
},
|
| 222 |
+
"confs": {
|
| 223 |
+
"token": "test_token",
|
| 224 |
+
"uuid": "test-uuid",
|
| 225 |
+
"openai_key": "",
|
| 226 |
+
"pinecone_key": "",
|
| 227 |
+
"pinecone_env": "",
|
| 228 |
+
"firebase_key": "",
|
| 229 |
+
"settings": {"temperature": 0.6},
|
| 230 |
+
},
|
| 231 |
+
}
|
| 232 |
+
)
|
| 233 |
+
],
|
| 234 |
+
)
|
| 235 |
+
def test_delete_data(body):
|
| 236 |
+
response = client.post("/auto_task/delete", json=body)
|
| 237 |
+
assert response.status_code == 200
|