@@ -344,6 +344,46 @@ def testWriteMultipleChild(self):
344344 except UnsupportedProtocolException :
345345 self .assertTrue (serial_version < 4 )
346346
347+ def testWriteMultipleChildrenOnly (self ):
348+ num_operations = 6
349+ wm_req = WriteMultipleRequest ()
350+ for i in range (num_operations ):
351+ child_row = dict ()
352+ child_row ['fld_sid' ] = 1
353+ child_row ['fld_id' ] = i
354+ child_row ['childid' ] = i
355+ child_row ['childname' ] = 'name_' + str (i )
356+ child_row ['childdata' ] = 'data_' + str (i )
357+
358+ request = PutRequest ()
359+ request .set_value (child_row )
360+ request .set_table_name (self .child_table_name )
361+ request .set_ttl (self .ttl )
362+ request .set_return_row (True )
363+ wm_req .add (request , True )
364+
365+ # put this test in try/except to handle versions of the server
366+ # that cannot handle multiple table names. Technically the
367+ # change happened mid-V3 so the check for serial_version < 4 isn't
368+ # perfect, but it's good enough
369+ try :
370+ result = self .handle .write_multiple (wm_req )
371+ op_results = self ._check_write_multiple_result (result , num_operations )
372+
373+ for i in range (num_operations ):
374+ child_row = dict ()
375+ child_row ['fld_sid' ] = 1
376+ child_row ['fld_id' ] = i
377+ child_row ['childid' ] = i
378+ request = GetRequest ()
379+ request .set_key (child_row )
380+ request .set_table_name (self .child_table_name )
381+ result = self .handle .get (request )
382+ self .assertEqual ('name_' + str (i ), result .get_value ()['childname' ])
383+ self .assertEqual ('data_' + str (i ), result .get_value ()['childdata' ])
384+ except UnsupportedProtocolException :
385+ self .assertTrue (serial_version < 4 )
386+
347387 def testWriteMultipleAbortIfUnsuccessful (self ):
348388 failed_idx = 1
349389 for request in self .requests :
0 commit comments