Coverage for backend/django/flowsheetInternals/unitops/models/property_package_propogation.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-05-13 02:47 +0000

1from flowsheetInternals.unitops.models.SimulationObject import SimulationObject 

2 

3from flowsheetInternals.unitops.models.flow_tracking import track_stream_flow 

4 

5def propogate_property_package(stream: SimulationObject): 

6 """ 

7 Starting from this stream, propogate the property package to all connected streams. 

8 """ 

9 unit_ops, streams = track_stream_flow(stream) 

10 

11 SimulationObject.objects.filter(id__in=[s.id for s in streams]).update(propertyPackageType=stream.propertyPackageType, customPackage=stream.customPackage) 

12