Skip to content

Commit c617ac8

Browse files
committed
feat: update add_block function to include thing parameter for enhanced context
1 parent e4d4252 commit c617ac8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/features/environment.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,9 @@ def add_deployment(context, session, tid, sid):
325325

326326

327327
@add_context_object_container("blocks")
328-
def add_block(context, session, parameter):
328+
def add_block(context, session, parameter, thing):
329329
block = TransducerObservationBlock(
330+
thing_id=thing.id,
330331
parameter_id=parameter.id,
331332
start_datetime=datetime.now() - timedelta(hours=1),
332333
end_datetime=datetime.now() + timedelta(hours=1),
@@ -673,7 +674,7 @@ def before_all(context):
673674

674675
# parameter ID can be hardcoded because init_parameter always creates the same one
675676
parameter = session.get(Parameter, 1)
676-
block = add_block(context, session, parameter)
677+
block = add_block(context, session, parameter, well_1)
677678
for i in range(1, 10):
678679
add_transducer_observation(
679680
context, session, block, deployment.id, random.random()

0 commit comments

Comments
 (0)