-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmyTest.py
59 lines (48 loc) · 1.08 KB
/
myTest.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
from datetime import datetime
import requests
baseUrl = "http://127.0.0.1:7457"
endpoint = "/castVote"
headers = {"Content-Type": "application/json"}
jsonData = {
"candidateId": "MyCID",
"candidateName": "NAME11",
"voterId": 00,
"district": 123,
"ward": 1,
}
url = baseUrl + endpoint
# print(url)
# r = requests.post(url=url, json=jsonData, headers=headers)
# print("Response is:", r.json())
# print(type(r.json()["result"]))
addCandidate = {
"candidateId": 1234,
"candidateName": "Candidate Name 1",
"state": "KA",
"district": "BGM",
"ward": 4,
}
castVote = {
"candidateId": 789,
"candidateName": "Casted Candidate",
"fromVoter": "kjashvuishgvuiwlavysqlgvidbdbrsagyv",
}
getCandidate = {"state": "KA", "district": "BGM", "ward": 4}
login = {
"voterId": "VoterId",
"password": "TestPass",
}
nodeRegister = {
"nodeAddress": "127.0.0.1:8000",
}
search = {
"blockHash": 12,
"blockNo": 45,
"fromVoter": 45,
}
signUp = {
"voterId": "VoterId",
"name": "Voter Name",
"mobile": 132456789,
"password": "TestPass",
}