def test_delete_transport_recursive(self): self.transport.delete(recursive=True) self.assertEqual(self.connection.execs, [ Request.put(uri='/sap/bc/adt/cts/transportrequests/NPLK007001', body=f'''<?xml version="1.0" encoding="ASCII"?> <tm:root xmlns:tm="http://www.sap.com/cts/adt/tm" tm:number="NPLK007001" tm:useraction="removeobject"> <tm:request> <tm:abap_object tm:name="{self.object_1_1.name}" tm:obj_desc="{self.object_1_1.description}" tm:pgmid="{self.object_1_1.pgmid}" tm:type="{self.object_1_1.type}" tm:position="{self.object_1_1.position}"/> </tm:request> </tm:root>'''), Request.put(uri='/sap/bc/adt/cts/transportrequests/NPLK007001', body=f'''<?xml version="1.0" encoding="ASCII"?> <tm:root xmlns:tm="http://www.sap.com/cts/adt/tm" tm:number="NPLK007001" tm:useraction="removeobject"> <tm:request> <tm:abap_object tm:name="{self.object_1_2.name}" tm:obj_desc="{self.object_1_2.description}" tm:pgmid="{self.object_1_2.pgmid}" tm:type="{self.object_1_2.type}" tm:position="{self.object_1_2.position}"/> </tm:request> </tm:root>'''), Request.delete('/sap/bc/adt/cts/transportrequests/NPLK007001'), Request.put(uri='/sap/bc/adt/cts/transportrequests/NPLK007002', body=f'''<?xml version="1.0" encoding="ASCII"?> <tm:root xmlns:tm="http://www.sap.com/cts/adt/tm" tm:number="NPLK007002" tm:useraction="removeobject"> <tm:request> <tm:abap_object tm:name="{self.object_2_1.name}" tm:obj_desc="{self.object_2_1.description}" tm:pgmid="{self.object_2_1.pgmid}" tm:type="{self.object_2_1.type}" tm:position="{self.object_2_1.position}"/> </tm:request> </tm:root>'''), Request.put(uri='/sap/bc/adt/cts/transportrequests/NPLK007002', body=f'''<?xml version="1.0" encoding="ASCII"?> <tm:root xmlns:tm="http://www.sap.com/cts/adt/tm" tm:number="NPLK007002" tm:useraction="removeobject"> <tm:request> <tm:abap_object tm:name="{self.object_2_2.name}" tm:obj_desc="{self.object_2_2.description}" tm:pgmid="{self.object_2_2.pgmid}" tm:type="{self.object_2_2.type}" tm:position="{self.object_2_2.position}"/> </tm:request> </tm:root>'''), Request.delete('/sap/bc/adt/cts/transportrequests/NPLK007002'), Request.delete('/sap/bc/adt/cts/transportrequests/NPLK007000'), ])
def test_delete_transport(self): self.transport.delete() self.assertEqual( self.connection.execs, [Request.delete('/sap/bc/adt/cts/transportrequests/NPLK007000')])