File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 99
1010import unittest
1111import decimal
12+ import platform
1213import time
1314import os
1415import sys
@@ -457,6 +458,22 @@ def test_long_string_types(self):
457458 finally :
458459 con .close ()
459460
461+ def test_connection_properties (self ):
462+
463+ clientInfo = "NuoDB Python driver"
464+ tmp_args = self .connect_kw_args .copy ()
465+ tmp_args ['options' ] = {'schema' : 'test' , 'clientInfo' : clientInfo }
466+ con = pynuodb .connect (** tmp_args )#self._connect({'clientInfo':'Hello World'})
467+ cursor = con .cursor ()
468+ cursor .execute ("select * from SYSTEM.CONNECTIONS" )
469+ result = cursor .fetchone ()
470+
471+ #Make sure our clientHost, clientProcessId and clientInfo remain the same in the SYSTEM.CONNECTIONS table
472+ self .assertEqual (platform .node (), result [17 ])
473+ self .assertEqual (str (os .getpid ()), result [18 ])
474+ self .assertEqual (clientInfo , result [19 ])
475+
476+
460477 def test_utf8_string_types (self ):
461478 con = self ._connect ()
462479 cursor = con .cursor ()
You can’t perform that action at this time.
0 commit comments