This repository has been archived by the owner on Nov 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_one.py
55 lines (48 loc) · 1.77 KB
/
test_one.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
import sys, os
import snow_connection
def verify_task():
gr = snow_connection.client.GlideRecord("u_project_verify")
gr.get("u_description")
gr.query()
is_description_found = False
for r in gr:
gr.get_display_value("u_description")
if "Test Task 1" in gr.get_display_value("u_description"):
print(f'Task 1: Field <Description> with value {gr.get_value("u_description")} found')
is_description_found = True
break
else:
continue
gr = snow_connection.client.GlideRecord("u_project_verify")
gr.get("u_short_description")
gr.query()
is_short_description_found = False
for r in gr:
gr.get_display_value("u_short_description")
if gr.get_display_value("u_short_description") == 'Test 1':
print(f'Task 1: Field <Short description> with value {gr.get_display_value("u_short_description")} found')
is_short_description_found = True
break
else:
continue
gr = snow_connection.client.GlideRecord("u_project_verify")
gr.get('u_assigned_to')
gr.query()
is_assigned_to_found = False
for r in gr:
gr.get_display_value('u_assigned_to')
if gr.get_display_value('u_assigned_to') == 'Jason Roy':
print(f'Task 1: Field <Assigned to> with value' \
f' {gr.get_display_value("u_assigned_to")} found')
is_assigned_to_found = True
break
else:
continue
if is_description_found and is_short_description_found and is_assigned_to_found:
print("Task 1: All found")
return True
else:
return False
# Uncomment for debugging purposes only
# verify_task()
application_path = os.path.dirname(sys.executable)