Skip to content

Commit

Permalink
Fix test to use default manager
Browse files Browse the repository at this point in the history
  • Loading branch information
zachaysan committed Aug 19, 2024
1 parent 366ade9 commit cc7c753
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions api/tests/unit/segments/test_unit_segments_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,7 @@ def test_update_segment_versioned_segment_with_thrown_exception(
rule=nested_rule, property="foo", operator=EQUAL, value="bar"
)

assert (
segment.version == 2 == Segment.all_objects.filter(version_of=segment).count()
)
assert segment.version == 2 == Segment.objects.filter(version_of=segment).count()

new_condition_property = "foo2"
new_condition_value = "bar"
Expand Down Expand Up @@ -708,9 +706,7 @@ def test_update_segment_versioned_segment_with_thrown_exception(
segment.refresh_from_db()

# Now verify that the version of the segment has not been changed.
assert (
segment.version == 2 == Segment.all_objects.filter(version_of=segment).count()
)
assert segment.version == 2 == Segment.objects.filter(version_of=segment).count()


@pytest.mark.parametrize(
Expand Down

0 comments on commit cc7c753

Please sign in to comment.