File size: 2,121 Bytes
583f6dd
9dba5c6
583f6dd
9dba5c6
583f6dd
 
 
 
 
af895b2
 
 
 
 
 
 
139f107
50c1399
af895b2
 
139f107
50c1399
 
 
 
 
84875e8
50c1399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72194e7
 
 
 
 
50c1399
 
 
 
 
72194e7
 
50c1399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
from fastapi.testclient import TestClient
from api.main import app

client = TestClient(app)

def test_root():
    response = client.get("/")
    assert response.status_code == 200
    assert response.json() == {"response":"Hello"}


def test_context_analysis():
    payload = {
        "message": "Hello"
    }

    response = client.post("/api/context-analysis", json=payload)
    print(response.json())
    assert response.status_code == 200
    assert response.json()


def test_orchestrator():
    payload = {
        "message":"Mention some popular influencers of nepal"
    }
    response = client.post("/api/orchestration", json=payload)
    print(response.json())
    assert response.status_code == 200

def test_analytics():
    response = client.post("/api/show-analytics", json={})
    print(response.json())
    assert response.status_code == 200

def test_ideation():
    response = client.post("/api/ideation", json={})
    print(response.json())
    assert response.status_code == 200

def test_human_refining_ideation():
    payload = {
        "query": "Combine ideas 1 and 2",
        "thread_id":"refine_ideas_thread"
    }
    response = client.post("/api/human-idea-refining", json=payload)
    print(response.json())
    assert response.status_code == 200

def test_brainstorming():
    payload = {
        "preferred_topics": [],
        "image_base64_list": []
    }
    response = client.post("/api/brainstorm", json=payload)
    print(response.json())
    assert response.status_code == 200

def test_brainstorming_with_topics():
    payload = {
        "preferred_topics": ["fitness","community"],
        "image_base64_list": []
    }
    response = client.post("/api/brainstorm", json=payload)
    print(response.json())
    assert response.status_code == 200

def test_final_story_generation():
    response = client.post("/api/generate-final-story", json={})
    print(response.json())
    assert response.status_code == 200

def test_image_generation():
    response = client.post("/api/generate-image", json={})
    print(response.json())
    assert response.status_code == 200