@@ -271,6 +271,20 @@ def test_edit_summary_with_editgroups(self):
271271 )
272272 batch_id = batch .id
273273 cmd = BatchCommand .objects .get (batch = batch , index = 0 )
274+ self .assertEqual (
275+ cmd .edit_summary (),
276+ f"QuickStatements 3.0 [[:toollabs:abcdef/batch/{ batch_id } |batch #{ batch_id } ]]: b: my comment" ,
277+ )
278+ cmd = BatchCommand .objects .get (batch = batch , index = 1 )
279+ self .assertEqual (
280+ cmd .edit_summary (),
281+ f"QuickStatements 3.0 [[:toollabs:abcdef/batch/{ batch_id } |batch #{ batch_id } ]]: b" ,
282+ )
283+ batch = BatchFactory .load_from_parser (
284+ v1 , "" , "u" , "Q1|P1|Q2 /* my comment */||Q1|P1|Q3"
285+ )
286+ batch_id = batch .id
287+ cmd = BatchCommand .objects .get (batch = batch , index = 0 )
274288 self .assertEqual (
275289 cmd .edit_summary (),
276290 f"QuickStatements 3.0 [[:toollabs:abcdef/batch/{ batch_id } |batch #{ batch_id } ]]: my comment" ,
@@ -821,6 +835,18 @@ def test_edit_summary_with_editgroups(self):
821835 batch = BatchFactory .load_from_parser (par , "b" , "u" , COMMAND )
822836 batch_id = batch .id
823837 cmd = BatchCommand .objects .get (batch = batch , index = 0 )
838+ self .assertEqual (
839+ cmd .edit_summary (),
840+ f"QuickStatements 3.0 [[:toollabs:abcdef/batch/{ batch_id } |batch #{ batch_id } ]]: b: my comment" ,
841+ )
842+ cmd = BatchCommand .objects .get (batch = batch , index = 1 )
843+ self .assertEqual (
844+ cmd .edit_summary (),
845+ f"QuickStatements 3.0 [[:toollabs:abcdef/batch/{ batch_id } |batch #{ batch_id } ]]: b" ,
846+ )
847+ batch = BatchFactory .load_from_parser (par , "" , "u" , COMMAND )
848+ batch_id = batch .id
849+ cmd = BatchCommand .objects .get (batch = batch , index = 0 )
824850 self .assertEqual (
825851 cmd .edit_summary (),
826852 f"QuickStatements 3.0 [[:toollabs:abcdef/batch/{ batch_id } |batch #{ batch_id } ]]: my comment" ,
@@ -838,11 +864,16 @@ def test_edit_summary_without_editgroups(self):
838864Q4115189,Q5,
839865"""
840866 par = CSVCommandParser ()
841- batch = BatchFactory .load_from_parser (par , "b " , "u" , COMMAND )
867+ batch = BatchFactory .load_from_parser (par , "" , "u" , COMMAND )
842868 cmd = BatchCommand .objects .get (batch = batch , index = 0 )
843869 self .assertEqual (cmd .edit_summary (), "my comment" )
844870 cmd = BatchCommand .objects .get (batch = batch , index = 1 )
845871 self .assertEqual (cmd .edit_summary (), "" )
872+ batch = BatchFactory .load_from_parser (par , "b" , "u" , COMMAND )
873+ cmd = BatchCommand .objects .get (batch = batch , index = 0 )
874+ self .assertEqual (cmd .edit_summary (), "b: my comment" )
875+ cmd = BatchCommand .objects .get (batch = batch , index = 1 )
876+ self .assertEqual (cmd .edit_summary (), "b" )
846877
847878 def test_remove_statemeny_by_value (self ):
848879 COMMAND = """qid,P31,-P31
0 commit comments