-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpwManager-test.py
53 lines (39 loc) · 1.26 KB
/
pwManager-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
from package.pwManager import Account, AdminAccountException, AdminAcount
sap = Account('SAP', 'sofiane', 'Celle@@2022##')
sap.getProgrammName()
print(sap)
## hier würde ich sagen, wenn der Übergabeparameter isAdminAccount = False ist, dann würde ich ein Account
try:
sap.createAccount('Workday', 'Sofiane', '12121', isAdminAccount=False)
except AdminAccountException as e:
print(e)
try:
sap.createAccount('SAP', 'Julia', '12121', isAdminAccount=True)
except AdminAccountException as e:
print(e)
try:
sap.createAccount('Vscode', 'Redouane', '12121', isAdminAccount=True)
except AdminAccountException as e:
print(e)
try:
sap.createAccount('Sage', 'Hamid', '12121', isAdminAccount=False)
except AdminAccountException as e:
print(e)
try:
sap.createAccount('Sage', 'Viktoria', '12121', False)
except AdminAccountException as e:
print(e)
try:
sap.createAccount('Sage', 'Niko', '12121', True)
except AdminAccountException as e:
print(e)
try:
sap.createAccount('Sage', 'Niko', '12121')
except AdminAccountException as e:
print(e)
## wenn der Übergebeparameter isAdminAccount nicht gegeben wird,
try:
sap.createAccount('Sage', 'Nikolas', '12121')
except AdminAccountException as e:
print(e)
sap.recapAccount()