Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jtcohen6 committed May 7, 2024
1 parent e349e01 commit a0fdc3d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/functional/artifacts/test_run_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ def test_timing_exists(self, project):
assert len(results.results[0].timing) > 0


class TestRunResultsSerializableInContext:
@pytest.fixture(scope="class")
def models(self):
return {"model.sql": good_model_sql}

@pytest.fixture(scope="class")
def project_config_update(self):
return {
"on-run-end": ["{% for result in results %}{{ log(result.to_dict()) }}{% endfor %}"]
}

def test_results_serializable(self, project):
results = run_dbt(["run"])
assert len(results.results) == 1


# This test is failing due to the faulty assumptions that run_results.json would
# be written multiple times. Temporarily disabling.
@pytest.mark.skip()
Expand Down

0 comments on commit a0fdc3d

Please sign in to comment.