Skip to content

Commit e2ee280

Browse files
committed
CV3-68-refactor(fixtures): refactor fixtures folder
- split fixture files in question to query and response [Finishes CV3-68]
1 parent 6b5bb6e commit e2ee280

File tree

62 files changed

+2211
-2158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2211
-2158
lines changed
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
all_analytics_query_response = {
2+
"data": {
3+
"allAnalytics": {
4+
"checkinsPercentage": 0.0,
5+
"appBookingsPercentage": 0.0,
6+
"autoCancellationsPercentage": 0.0,
7+
"cancellationsPercentage": 0.0,
8+
"bookings": 1,
9+
"analytics": [
10+
{
11+
"roomName": "Entebbe",
12+
"cancellations": 0,
13+
"cancellationsPercentage": 0.0,
14+
"autoCancellations": 0,
15+
"numberOfBookings": 1,
16+
"checkins": 0,
17+
"checkinsPercentage": 0.0,
18+
"bookingsPercentageShare": 100.0,
19+
"appBookings": 0,
20+
"appBookingsPercentage": 0.0,
21+
"events": [
22+
{
23+
"durationInMinutes": 45
24+
}
25+
]
26+
},
27+
{
28+
"roomName": "Tana",
29+
"cancellations": 0,
30+
"cancellationsPercentage": 0.0,
31+
"autoCancellations": 0,
32+
"numberOfBookings": 0,
33+
"checkins": 0,
34+
"checkinsPercentage": 0.0,
35+
"bookingsPercentageShare": 0.0,
36+
"appBookings": 0,
37+
"appBookingsPercentage": 0.0,
38+
"events": [
39+
{
40+
"durationInMinutes": 0
41+
}
42+
]
43+
}
44+
],
45+
"bookingsCount": [
46+
{
47+
"totalBookings": 1,
48+
"period": "Jul 11 2018"
49+
},
50+
{
51+
'totalBookings': 0,
52+
'period': 'Jul 12 2018'
53+
}
54+
]
55+
}
56+
}
57+
}
58+
59+
all_analytics_query_response_super_admin_with_invalid_locationid = {
60+
"errors": [
61+
{
62+
"message": "Location Id does not exist",
63+
"locations": [
64+
{
65+
"line": 3,
66+
"column": 7
67+
}
68+
],
69+
"path": [
70+
"allAnalytics"
71+
]
72+
}
73+
],
74+
"data": {
75+
"allAnalytics": None
76+
}
77+
}
78+
79+
all_analytics_query_response_super_admin = {
80+
"data": {
81+
"allAnalytics": {
82+
"checkinsPercentage": 0.0,
83+
"appBookingsPercentage": 0.0,
84+
"autoCancellationsPercentage": 0.0,
85+
"cancellationsPercentage": 0.0,
86+
"bookings": 12,
87+
"analytics": [
88+
{
89+
"roomName": "Oculus",
90+
"cancellations": 0,
91+
"cancellationsPercentage": 0.0,
92+
"autoCancellations": 0,
93+
"numberOfBookings": 6,
94+
"checkins": 0,
95+
"checkinsPercentage": 0.0,
96+
"bookingsPercentageShare": 50.0,
97+
"appBookings": 0,
98+
"appBookingsPercentage": 0.0,
99+
"events": [
100+
{
101+
"durationInMinutes": 890
102+
}
103+
]
104+
},
105+
{
106+
"roomName": "Krypton",
107+
"cancellations": 0,
108+
"cancellationsPercentage": 0.0,
109+
"autoCancellations": 0,
110+
"numberOfBookings": 3,
111+
"checkins": 0,
112+
"checkinsPercentage": 0.0,
113+
"bookingsPercentageShare": 25.0,
114+
"appBookings": 0,
115+
"appBookingsPercentage": 0.0,
116+
"events": [
117+
{
118+
"durationInMinutes": 155
119+
}
120+
]
121+
},
122+
{
123+
"roomName": "Bujumbura",
124+
"cancellations": 0,
125+
"cancellationsPercentage": 0.0,
126+
"autoCancellations": 0,
127+
"numberOfBookings": 3,
128+
"checkins": 0,
129+
"checkinsPercentage": 0.0,
130+
"bookingsPercentageShare": 25.0,
131+
"appBookings": 0,
132+
"appBookingsPercentage": 0.0,
133+
"events": [
134+
{
135+
"durationInMinutes": 92
136+
}
137+
]
138+
},
139+
{
140+
"roomName": "Kampala",
141+
"cancellations": 0,
142+
"cancellationsPercentage": 0.0,
143+
"autoCancellations": 0,
144+
"numberOfBookings": 0,
145+
"checkins": 0,
146+
"checkinsPercentage": 0.0,
147+
"bookingsPercentageShare": 0.0,
148+
"appBookings": 0,
149+
"appBookingsPercentage": 0.0,
150+
"events": [
151+
{
152+
"durationInMinutes": 0
153+
}
154+
]
155+
},
156+
{
157+
"roomName": "Algiers",
158+
"cancellations": 0,
159+
"cancellationsPercentage": 0.0,
160+
"autoCancellations": 0,
161+
"numberOfBookings": 0,
162+
"checkins": 0,
163+
"checkinsPercentage": 0.0,
164+
"bookingsPercentageShare": 0.0,
165+
"appBookings": 0,
166+
"appBookingsPercentage": 0.0,
167+
"events": [
168+
{
169+
"durationInMinutes": 0
170+
}
171+
]
172+
}
173+
],
174+
"bookingsCount": [
175+
{
176+
"totalBookings": 7,
177+
"period": "Jul 11 2018"
178+
},
179+
{
180+
"totalBookings": 5,
181+
"period": "Jul 12 2018"
182+
}
183+
]
184+
}
185+
}
186+
}

fixtures/analytics/query_all_analytics_fixtures.py

Lines changed: 0 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -59,193 +59,6 @@
5959
}
6060
'''
6161

62-
all_analytics_query_response = {
63-
"data": {
64-
"allAnalytics": {
65-
"checkinsPercentage": 0.0,
66-
"appBookingsPercentage": 0.0,
67-
"autoCancellationsPercentage": 0.0,
68-
"cancellationsPercentage": 0.0,
69-
"bookings": 1,
70-
"analytics": [
71-
{
72-
"roomName": "Entebbe",
73-
"cancellations": 0,
74-
"cancellationsPercentage": 0.0,
75-
"autoCancellations": 0,
76-
"numberOfBookings": 1,
77-
"checkins": 0,
78-
"checkinsPercentage": 0.0,
79-
"bookingsPercentageShare": 100.0,
80-
"appBookings": 0,
81-
"appBookingsPercentage": 0.0,
82-
"events": [
83-
{
84-
"durationInMinutes": 45
85-
}
86-
]
87-
},
88-
{
89-
"roomName": "Tana",
90-
"cancellations": 0,
91-
"cancellationsPercentage": 0.0,
92-
"autoCancellations": 0,
93-
"numberOfBookings": 0,
94-
"checkins": 0,
95-
"checkinsPercentage": 0.0,
96-
"bookingsPercentageShare": 0.0,
97-
"appBookings": 0,
98-
"appBookingsPercentage": 0.0,
99-
"events": [
100-
{
101-
"durationInMinutes": 0
102-
}
103-
]
104-
}
105-
],
106-
"bookingsCount": [
107-
{
108-
"totalBookings": 1,
109-
"period": "Jul 11 2018"
110-
},
111-
{
112-
'totalBookings': 0,
113-
'period': 'Jul 12 2018'
114-
}
115-
]
116-
}
117-
}
118-
}
119-
120-
all_analytics_query_response_super_admin_with_invalid_locationid = {
121-
"errors": [
122-
{
123-
"message": "Location Id does not exist",
124-
"locations": [
125-
{
126-
"line": 3,
127-
"column": 7
128-
}
129-
],
130-
"path": [
131-
"allAnalytics"
132-
]
133-
}
134-
],
135-
"data": {
136-
"allAnalytics": None
137-
}
138-
}
139-
140-
all_analytics_query_response_super_admin = {
141-
"data": {
142-
"allAnalytics": {
143-
"checkinsPercentage": 0.0,
144-
"appBookingsPercentage": 0.0,
145-
"autoCancellationsPercentage": 0.0,
146-
"cancellationsPercentage": 0.0,
147-
"bookings": 12,
148-
"analytics": [
149-
{
150-
"roomName": "Oculus",
151-
"cancellations": 0,
152-
"cancellationsPercentage": 0.0,
153-
"autoCancellations": 0,
154-
"numberOfBookings": 6,
155-
"checkins": 0,
156-
"checkinsPercentage": 0.0,
157-
"bookingsPercentageShare": 50.0,
158-
"appBookings": 0,
159-
"appBookingsPercentage": 0.0,
160-
"events": [
161-
{
162-
"durationInMinutes": 890
163-
}
164-
]
165-
},
166-
{
167-
"roomName": "Krypton",
168-
"cancellations": 0,
169-
"cancellationsPercentage": 0.0,
170-
"autoCancellations": 0,
171-
"numberOfBookings": 3,
172-
"checkins": 0,
173-
"checkinsPercentage": 0.0,
174-
"bookingsPercentageShare": 25.0,
175-
"appBookings": 0,
176-
"appBookingsPercentage": 0.0,
177-
"events": [
178-
{
179-
"durationInMinutes": 155
180-
}
181-
]
182-
},
183-
{
184-
"roomName": "Bujumbura",
185-
"cancellations": 0,
186-
"cancellationsPercentage": 0.0,
187-
"autoCancellations": 0,
188-
"numberOfBookings": 3,
189-
"checkins": 0,
190-
"checkinsPercentage": 0.0,
191-
"bookingsPercentageShare": 25.0,
192-
"appBookings": 0,
193-
"appBookingsPercentage": 0.0,
194-
"events": [
195-
{
196-
"durationInMinutes": 92
197-
}
198-
]
199-
},
200-
{
201-
"roomName": "Kampala",
202-
"cancellations": 0,
203-
"cancellationsPercentage": 0.0,
204-
"autoCancellations": 0,
205-
"numberOfBookings": 0,
206-
"checkins": 0,
207-
"checkinsPercentage": 0.0,
208-
"bookingsPercentageShare": 0.0,
209-
"appBookings": 0,
210-
"appBookingsPercentage": 0.0,
211-
"events": [
212-
{
213-
"durationInMinutes": 0
214-
}
215-
]
216-
},
217-
{
218-
"roomName": "Algiers",
219-
"cancellations": 0,
220-
"cancellationsPercentage": 0.0,
221-
"autoCancellations": 0,
222-
"numberOfBookings": 0,
223-
"checkins": 0,
224-
"checkinsPercentage": 0.0,
225-
"bookingsPercentageShare": 0.0,
226-
"appBookings": 0,
227-
"appBookingsPercentage": 0.0,
228-
"events": [
229-
{
230-
"durationInMinutes": 0
231-
}
232-
]
233-
}
234-
],
235-
"bookingsCount": [
236-
{
237-
"totalBookings": 7,
238-
"period": "Jul 11 2018"
239-
},
240-
{
241-
"totalBookings": 5,
242-
"period": "Jul 12 2018"
243-
}
244-
]
245-
}
246-
}
247-
}
248-
24962
analytics_query_for_date_ranges = '''
25063
query {
25164
allAnalytics(startDate:"jul 11 2020", endDate:"jul 12 2018") {

0 commit comments

Comments
 (0)