@@ -72,7 +72,7 @@ def test_find_simple(self):
72
72
self .assertEqual (find_cmd .command ['projection' ],
73
73
{'_id' : True , 'data' : True })
74
74
75
- def test_find_projection (self ):
75
+ def test_find_with_projection (self ):
76
76
expected = Table .from_pydict (
77
77
{'_id' : [4 , 3 ], 'data' : [None , 60 ]},
78
78
ArrowSchema ([('_id' , int32 ()), ('data' , int64 ())]))
@@ -87,6 +87,17 @@ def test_find_projection(self):
87
87
self .assertEqual (find_cmd .command_name , 'find' )
88
88
self .assertEqual (find_cmd .command ['projection' ], projection )
89
89
90
+ def test_find_with_session (self ):
91
+ with self .client .start_session () as session :
92
+ self .assertIsNone (session .operation_time )
93
+ last_use = session ._server_session .last_use
94
+ expected = Table .from_pydict (
95
+ {'_id' : [1 , 2 , 3 , 4 ], 'data' : [10 , 20 , 30 , None ]},
96
+ ArrowSchema ([('_id' , int32 ()), ('data' , int64 ())]))
97
+ table = self .run_find ({}, schema = self .schema , session = session )
98
+ self .assertEqual (table , expected )
99
+ self .assertIsNotNone (session .operation_time )
100
+
90
101
def test_find_multiple_batches (self ):
91
102
orig_method = self .coll .find_raw_batches
92
103
0 commit comments