Skip to content

Commit

Permalink
update tests to assert on counts
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Oct 4, 2024
1 parent 379ed81 commit 72f28f2
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def test_get_runs_feed_with_subruns(self, gql_context_with_runs_and_backfills):
"includeRunsFromBackfills": True,
},
)
_assert_results_match_count_match_expected(result, 10)
prev_run_time = None
for res in result.data["runsFeedOrError"]["results"]:
assert res["__typename"] == "Run"
Expand Down Expand Up @@ -749,7 +750,7 @@ def test_get_runs_feed_filter_status_and_show_subruns(self, graphql_context):
assert not result.errors
assert result.data

assert len(result.data["runsFeedOrError"]["results"]) == 4
_assert_results_match_count_match_expected(result, 4)
assert not result.data["runsFeedOrError"]["hasMore"]

result = execute_dagster_graphql(
Expand All @@ -764,7 +765,7 @@ def test_get_runs_feed_filter_status_and_show_subruns(self, graphql_context):
)
assert not result.errors
assert result.data
assert len(result.data["runsFeedOrError"]["results"]) == 1
_assert_results_match_count_match_expected(result, 1)

result = execute_dagster_graphql(
graphql_context,
Expand All @@ -778,7 +779,7 @@ def test_get_runs_feed_filter_status_and_show_subruns(self, graphql_context):
)
assert not result.errors
assert result.data
assert len(result.data["runsFeedOrError"]["results"]) == 1
_assert_results_match_count_match_expected(result, 1)

result = execute_dagster_graphql(
graphql_context,
Expand All @@ -792,7 +793,7 @@ def test_get_runs_feed_filter_status_and_show_subruns(self, graphql_context):
)
assert not result.errors
assert result.data
assert len(result.data["runsFeedOrError"]["results"]) == 1
_assert_results_match_count_match_expected(result, 1)

result = execute_dagster_graphql(
graphql_context,
Expand All @@ -806,7 +807,7 @@ def test_get_runs_feed_filter_status_and_show_subruns(self, graphql_context):
)
assert not result.errors
assert result.data
assert len(result.data["runsFeedOrError"]["results"]) == 0
_assert_results_match_count_match_expected(result, 0)

def test_get_runs_feed_filter_create_time(self, graphql_context):
nothing_created_ts = get_current_timestamp()
Expand Down Expand Up @@ -1130,7 +1131,7 @@ def test_get_runs_feed_filters_that_dont_apply_to_backfills_and_show_subruns(
assert not result.errors
assert result.data

assert len(result.data["runsFeedOrError"]["results"]) == 1
_assert_results_match_count_match_expected(result, 1)
assert not result.data["runsFeedOrError"]["hasMore"]

result = execute_dagster_graphql(
Expand All @@ -1145,7 +1146,7 @@ def test_get_runs_feed_filters_that_dont_apply_to_backfills_and_show_subruns(
)
assert not result.errors
assert result.data
assert len(result.data["runsFeedOrError"]["results"]) == 1
_assert_results_match_count_match_expected(result, 1)

def test_get_runs_feed_filter_tags_and_status(self, graphql_context):
if not self.supports_filtering():
Expand Down

0 comments on commit 72f28f2

Please sign in to comment.