-
Notifications
You must be signed in to change notification settings - Fork 0
/
generate_test_data.py
49 lines (38 loc) · 1.77 KB
/
generate_test_data.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
from database import *
def run():
con = sqlite3.connect('mydatabase.db')
cursorObj = con.cursor()
cursorObj.execute('drop table if exists users')
cursorObj.execute('drop table if exists meet')
cursorObj.execute("CREATE TABLE users(username text PRIMARY KEY, phone integer, email text, password text, schedule text, friends text, pfriends text, meetings text)")
cursorObj.execute("CREATE TABLE meet(id integer PRIMARY KEY autoincrement, users text, time text, messages text, confirmed integer)")
register("HTY", 70707070, "[email protected]", "pp")
register("NGMH", 53180080, "[email protected]", "pp")
register("nuode", 53181080, "[email protected]", "pp")
register("Jeff", 53181080, "[email protected]", "pp")
print(requestfren("HTY", "NGMH")) #hty request to ngmh, friend request should show on ngmh
print(confirmfren("HTY", "NGMH", True)) #ngmh accept the friendrequest
print(requestfren("nuode", "NGMH")) #hty request to ngmh, friend request should show on ngmh
print(confirmfren("nuode", "NGMH", True)) #ngmh accept the friendrequest
print(requestfren("Jeff", "NGMH")) #hty request to ngmh, friend request should show on ngmh
print(editschedule("NGMH", "0"*334+"11"))
print(editschedule("HTY", "0"*334+"11"))
print(editschedule("Jeff", "0"*324+"1"*12))
print(editschedule("nuode", "0"*333+"111"))
"""
print(getschedule("HTY"))
print(findoverlaps("HTY"))
print(findoverlaps2(["HTY", "NGMH"]))
print(creatependingmeeting(["NGMH", "HTY"], 335))
print(confirmmeeting("HTY", 1))
print(confirmmeeting("NGMH", 1))
print(cancelmeeting(1))
print(creatependingmeeting(["NGMH", "HTY"], 335))
print(confirmmeeting("HTY", 2))
print(confirmmeeting("NGMH", 2))
print(getpendingmeeting("HTY"))
print(getconfirmedmeeting("HTY"))
"""
con.commit()
con.close()
print("All test data generated")