def test_session(self, m):
     m.get('https://example.com/EWS/types.xsd', status_code=200)
     protocol = Protocol(config=Configuration(
         service_endpoint='https://example.com/Foo.asmx', credentials=Credentials('A', 'B'),
         auth_type=NTLM, version=Version(Build(15, 1)), retry_policy=FailFast()
     ))
     session = protocol.create_session()
     new_session = protocol.renew_session(session)
     self.assertNotEqual(id(session), id(new_session))
Exemple #2
0
 def test_session(self, m):
     protocol = Protocol(config=Configuration(
         service_endpoint='https://example.com/Foo.asmx',
         credentials=Credentials(get_random_string(8), get_random_string(8)),
         auth_type=NTLM, version=Version(Build(15, 1)), retry_policy=FailFast()
     ))
     session = protocol.create_session()
     new_session = protocol.renew_session(session)
     self.assertNotEqual(id(session), id(new_session))