Skip to content

Commit

Permalink
fix: update another now failing test
Browse files Browse the repository at this point in the history
Signed-off-by: F.N. Claessen <[email protected]>
  • Loading branch information
Flix6x committed Jul 17, 2024
1 parent 90da973 commit a68b5cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions timely_beliefs/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def test_source_a(db):
"""Define source for test beliefs."""
source = DBBeliefSource("Source A")
session.add(source)
session.flush() # assign ID
return source


Expand All @@ -137,6 +138,7 @@ def test_source_b(db):
"""Define source for test beliefs."""
source = DBBeliefSource("Source B")
session.add(source)
session.flush() # assign ID
return source


Expand All @@ -148,14 +150,14 @@ def test_source_without_initial_data(db):
return source


@pytest.fixture(scope="function", params=[1, 2])
@pytest.fixture(scope="function")
def rolling_day_ahead_beliefs_about_time_slot_events(
request, time_slot_sensor: DBSensor
request, time_slot_sensor: DBSensor, test_source_b
):
"""Define multiple day-ahead beliefs about an ex post time slot event."""
source = (
session.query(DBBeliefSource)
.filter(DBBeliefSource.id == request.param)
.filter(DBBeliefSource.id == test_source_b.id)
.one_or_none()
)

Expand Down
1 change: 1 addition & 0 deletions timely_beliefs/tests/test_belief_persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_adding_to_session(
sensor=time_slot_sensor,
source=test_source_b,
)
assert not bdf.empty

# Replace the source
if replace_source:
Expand Down

0 comments on commit a68b5cb

Please sign in to comment.