-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest_bookings.py
54 lines (49 loc) · 1.46 KB
/
test_bookings.py
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
"""Run this script to simulate something being sent by the bookings endpoint."""
import requests
import os
body = {
"service": "roombookings",
"name": "bookings_changed",
"verification_secret": os.environ['UCLAPI_VERIFICATION_SECRET'],
"content": {
"bookings_added": [
{
"phone": None,
"contact": "Jane Smith - Excessive Roombooking Society",
"weeknumber": 52,
"description": "Rm. Closed",
"start_time": "2017-10-09T23:00:00+01:00",
"roomid": "G08",
"siteid": "013",
"roomname": "Chadwick Building G08",
"slotid": 907872,
"end_time": "2017-08-27T23:30:00+01:00"
},
{
"phone": None,
"contact": "Jane Smith - JavaScript Appreciation Society",
"weeknumber": 52,
"description": "Rm. Closed",
"start_time": "2017-10-25T23:00:00+01:00",
"roomid": "G08",
"siteid": "013",
"roomname": "Main Quad",
"slotid": 907872,
"end_time": "2017-08-27T23:30:00+01:00"
},
{
"phone": None,
"contact": "Jane Smith - Walking Football Club",
"weeknumber": 52,
"description": "Rm. Closed",
"start_time": "2017-10-15T07:00:00+01:00",
"roomid": "G08",
"siteid": "013",
"roomname": "Wilkins Garden Room",
"slotid": 907872,
"end_time": "2017-08-27T23:30:00+01:00"
}
]
}
}
requests.post("https://4800db9b.ngrok.io", json=body)