@@ -42,9 +42,9 @@ def _create_token(self):
42
42
password = self .password
43
43
)
44
44
45
- self .assertIsNotNone (self .zapi .session_id , "Login by user and password was going wrong" )
45
+ self .assertIsNotNone (self .zapi ._ZabbixAPI__session_id , "Login by user and password was going wrong" )
46
46
47
- resp = self .zapi .user .checkAuthentication (sessionid = self .zapi .session_id )
47
+ resp = self .zapi .user .checkAuthentication (sessionid = self .zapi ._ZabbixAPI__session_id )
48
48
49
49
self .assertEqual (
50
50
type (resp ), dict , "Request user.checkAuthentication was going wrong" )
@@ -70,11 +70,11 @@ def _create_token(self):
70
70
71
71
self .zapi .logout ()
72
72
73
- self .assertIsNone (self .zapi .session_id , "Logout was going wrong" )
73
+ self .assertIsNone (self .zapi ._ZabbixAPI__session_id , "Logout was going wrong" )
74
74
75
75
with self .assertRaises (ZabbixAPIException ,
76
76
msg = "Request user.checkAuthentication after logout was going wrong" ):
77
- resp = self .zapi .user .checkAuthentication (sessionid = self .zapi .session_id )
77
+ resp = self .zapi .user .checkAuthentication (sessionid = self .zapi ._ZabbixAPI__session_id )
78
78
79
79
def test_classic_auth (self ):
80
80
"""Tests auth using username and password"""
@@ -92,7 +92,7 @@ def test_token_auth(self):
92
92
93
93
self .zapi .login (token = self .token )
94
94
95
- self .assertIsNotNone (self .zapi .session_id , "Login by token was going wrong" )
95
+ self .assertIsNotNone (self .zapi ._ZabbixAPI__session_id , "Login by token was going wrong" )
96
96
97
97
resp = self .zapi .user .checkAuthentication (token = self .token )
98
98
@@ -106,7 +106,7 @@ def test_token_auth(self):
106
106
107
107
self .zapi .logout ()
108
108
109
- self .assertIsNone (self .zapi .session_id , "Logout was going wrong" )
109
+ self .assertIsNone (self .zapi ._ZabbixAPI__session_id , "Logout was going wrong" )
110
110
111
111
self .assertEqual (
112
112
type (resp ), dict , "Request user.checkAuthentication was going wrong" )
0 commit comments