subashpoudel commited on
Commit
50c1399
·
1 Parent(s): 139f107

Included all test cases

Browse files
Files changed (1) hide show
  1. tests/test_api.py +60 -1
tests/test_api.py CHANGED
@@ -15,7 +15,66 @@ def test_context_analysis():
15
  }
16
 
17
  response = client.post("/api/context-analysis", json=payload)
 
18
  assert response.status_code == 200
19
  assert response.json()
20
 
21
- test_context_analysis()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
  response = client.post("/api/context-analysis", json=payload)
18
+ print(response.json())
19
  assert response.status_code == 200
20
  assert response.json()
21
 
22
+
23
+ def test_orchestrator():
24
+ payload = {
25
+ "message":"Mention some popular influencers of nepal"
26
+ }
27
+ response = client.post("/api/orchestrator", json=payload)
28
+ print(response.json())
29
+ assert response.status_code == 200
30
+
31
+ def test_analytics():
32
+ response = client.post("/api/show-analytics", json={})
33
+ print(response.json())
34
+ assert response.status_code == 200
35
+
36
+ def test_ideation():
37
+ response = client.post("/api/ideation", json={})
38
+ print(response.json())
39
+ assert response.status_code == 200
40
+
41
+ def test_human_refining_ideation():
42
+ payload = {
43
+ "query": "Combine ideas 1 and 2",
44
+ "thread_id":"refine_ideas_thread"
45
+ }
46
+ response = client.post("/api/human-idea-refining", json=payload)
47
+ print(response.json())
48
+ assert response.status_code == 200
49
+
50
+ def test_brainstorming():
51
+ response = client.post("/api/brainstorm", json={})
52
+ print(response.json())
53
+ assert response.status_code == 200
54
+
55
+ def test_brainstorming_with_topics():
56
+ payload = {
57
+ "preferred_topics": ["fitness","community"]
58
+ }
59
+ response = client.post("/api/brainstorm", json=payload)
60
+ print(response.json())
61
+ assert response.status_code == 200
62
+
63
+ def test_final_story_generation():
64
+ response = client.post("/api/generate-final-story", json={})
65
+ print(response.json())
66
+ assert response.status_code == 200
67
+
68
+ def test_image_generation():
69
+ response = client.post("/api/generate-image", json={})
70
+ print(response.json())
71
+ assert response.status_code == 200
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+