-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresponses.py
More file actions
208 lines (199 loc) · 5.49 KB
/
responses.py
File metadata and controls
208 lines (199 loc) · 5.49 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
"""Mock API responses for testing."""
from __future__ import annotations
# Planetary Positions Response
MOCK_POSITIONS_RESPONSE = {
"data": {
"positions": [
{
"name": "Sun",
"longitude": 283.45,
"latitude": 0.0,
"speed": 0.958,
"sign": "Capricorn",
"sign_longitude": 13.45,
"house": 10,
"retrograde": False,
},
{
"name": "Moon",
"longitude": 145.23,
"latitude": 5.12,
"speed": 13.176,
"sign": "Leo",
"sign_longitude": 25.23,
"house": 5,
"retrograde": False,
},
{
"name": "Mercury",
"longitude": 275.89,
"latitude": -2.45,
"speed": 1.234,
"sign": "Capricorn",
"sign_longitude": 5.89,
"house": 9,
"retrograde": False,
},
]
}
}
# Natal Chart Response
MOCK_NATAL_CHART_RESPONSE = {
"result": {
"chart": {
"planetary_positions": [
{
"name": "Sun",
"longitude": 283.45,
"latitude": 0.0,
"speed": 0.958,
"sign": "Capricorn",
"house": 10,
},
{
"name": "Moon",
"longitude": 145.23,
"latitude": 5.12,
"speed": 13.176,
"sign": "Leo",
"house": 5,
},
],
"house_cusps": [
{"house": 1, "longitude": 90.0, "sign": "Cancer"},
{"house": 2, "longitude": 120.0, "sign": "Leo"},
{"house": 3, "longitude": 150.0, "sign": "Virgo"},
],
"aspects": [
{
"point1": "Sun",
"point2": "Moon",
"type": "Trine",
"angle": 120.0,
"orb": 2.22,
"applying": True,
}
],
}
}
}
# Synastry Chart Response
MOCK_SYNASTRY_RESPONSE = {
"data": {
"subject1_chart": {
"planetary_positions": [{"name": "Sun", "longitude": 283.45, "sign": "Capricorn"}]
},
"subject2_chart": {
"planetary_positions": [{"name": "Sun", "longitude": 150.0, "sign": "Virgo"}]
},
"inter_aspects": [
{
"point1": "Sun",
"point2": "Moon",
"type": "Sextile",
"angle": 60.0,
"orb": 1.5,
}
],
}
}
# Horoscope Response
MOCK_HOROSCOPE_RESPONSE = {
"data": {
"content": "Today is a great day for new beginnings. The planetary alignments suggest...",
"date": "2024-06-15",
"period": "daily",
"transits": [
{"planet": "Mars", "house": 7, "aspect": "opposition", "native_planet": "Venus"}
],
}
}
# BaZi Response
MOCK_BAZI_RESPONSE = {
"result": {
"year_pillar": {
"heavenly_stem": "Geng",
"earthly_branch": "Wu",
"element": "Metal",
"animal": "Horse",
"yin_yang": "Yang",
},
"month_pillar": {
"heavenly_stem": "Ren",
"earthly_branch": "Wu",
"element": "Water",
"animal": "Horse",
"yin_yang": "Yang",
},
"day_pillar": {
"heavenly_stem": "Ji",
"earthly_branch": "Wei",
"element": "Earth",
"animal": "Goat",
"yin_yang": "Yin",
},
"hour_pillar": {
"heavenly_stem": "Geng",
"earthly_branch": "Wu",
"element": "Metal",
"animal": "Horse",
"yin_yang": "Yang",
},
"day_master": {
"element": "Earth",
"chinese": "己",
"strength_score": 88,
"classification": "Very Strong",
},
"element_balance": {
"Wood": 10,
"Fire": 30,
"Earth": 40,
"Metal": 15,
"Water": 5,
},
}
}
# Glossary Response
MOCK_GLOSSARY_CITIES_RESPONSE = {
"data": {
"items": [
{
"name": "New York",
"country": "United States",
"country_code": "US",
"latitude": 40.7128,
"longitude": -74.0060,
"timezone": "America/New_York",
"population": 8336817,
},
{
"name": "London",
"country": "United Kingdom",
"country_code": "GB",
"latitude": 51.5074,
"longitude": -0.1278,
"timezone": "Europe/London",
"population": 8982000,
},
],
"count": 2,
}
}
# Generic Error Response
MOCK_ERROR_RESPONSE = {
"message": "Invalid API key",
"code": "UNAUTHORIZED",
"details": {"reason": "The provided API key is not valid"},
}
# Validation Error Response
MOCK_VALIDATION_ERROR = {
"detail": [
{
"type": "missing",
"loc": ["body", "subject"],
"msg": "Field required",
"input": {"year": 1990},
}
]
}