Skip to content

Commit

Permalink
Use dbtUsageException
Browse files Browse the repository at this point in the history
  • Loading branch information
aranke committed Feb 9, 2023
1 parent 8195943 commit 5aa9f02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import os
import re
import yaml

from dbt.cli.main import dbtUsageException
from dbt.tests.util import run_dbt

MODELS__MODEL_SQL = """
Expand Down Expand Up @@ -86,9 +88,8 @@ def test_badproject(self, project):
self.check_project(splitout)

def test_not_found_project(self, project):
run_dbt(["debug", "--project-dir", "nopass"], expect_pass=False)
splitout = self.capsys.readouterr().out.split("\n")
self.check_project(splitout, msg="ERROR not found")
with pytest.raises(dbtUsageException):
run_dbt(["debug", "--project-dir", "nopass"])

def test_invalid_project_outside_current_dir(self, project):
# create a dbt_project.yml
Expand Down

0 comments on commit 5aa9f02

Please sign in to comment.