-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sharinf_DB_Con_Test.py
69 lines (59 loc) · 1.93 KB
/
Sharinf_DB_Con_Test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from Sharinf_DB_Con import DB_Accesser
myReqHandler = DB_Accesser()
m_user={
"email" : "[email protected]"
}
#myReqHandler.Insert_User(m_user)
#myReqHandler.print_allUsers()
m_file = {
"link" : "https://drive.google.com/drive/my-sdcdsa",
"owneremail" : "[email protected]",
"name":"Mole.png"
}
#print(myReqHandler.Insert_File(m_file))
#myReqHandler.print_allFiles()
#uuid cenas" AND l.major = 12 AND l.minor = 32;
m_location = {
"uuid" : "wedewqe4",
"major": 12,
"minor": 32,
"lvirtual": 0
}
Beacon = {
"localizationID":1
}
print(myReqHandler.Insert_Location(m_location))
#print(myReqHandler.Get_Location(Beacon))
#myReqHandler.cursor.close()
#myReqHndler.cnx.close()
sess = {
"permissions": 3,
"activeFlag": True,
"localizationID":1,
"s_type":1,
"s_name": "Sharinf_123"
}
sCreated = myReqHandler.Insert_Session(sess)
print (sCreated)
newConfig = {
"sessionID": 1,
"permissions":0
}
#}
#print(myReqHandler.Get_Session({"sessionID":1}))
#print(myReqHandler.Update_SessionConfig(newConfig))
#print(myReqHandler.Get_Session({"sessionID":1}))
#print(myReqHandler.End_Session({"sessionID" : 1}))
in_UserSess = {"sessionID" : 2, "email" : m_user["email"]}
#rint(myReqHandler.Get_UserInSession(in_UserSess))
#print(myReqHandler.Get_User(m_user))
print(myReqHandler.Get_Session({"sessionID":in_UserSess["sessionID"]}))
#print(myReqHandler.Insert_UserInSession(in_UserSess))
#print(myReqHandler.Set_SessionAdmin(in_UserSess))
#print(myReqHandler.Get_AllUsersInSession({"sessionID":1}))
#print(myReqHandler.Insert_FileInSession({"sessionID":1,"File":m_file}))
#print(myReqHandler.Get_AllFilesFromSession({"sessionID":1}))
#print(myReqHandler.Get_FileFromSession({"sessionID":1,"File":m_file}))
#print(myReqHandler.Get_SessionAdmin({"sessionID":1}))
#print(myReqHandler.Remove_FileFromSession({"sessionID":1,"File":m_file}))
#print(myReqHandler.Remove_UserFromSession({"email":m_user["email"], "sessionID": 1}))