Skip to content

Commit

Permalink
Fix unit test error
Browse files Browse the repository at this point in the history
The error was: `AttributeError: 'Namespace' object has no attribute 'MACRO_DEBUGGING'`
  • Loading branch information
mwallace582 committed Jan 9, 2024
1 parent f2f7fe8 commit 8d3ace0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ def profile_from_dict(profile, profile_name, cli_vars="{}"):
cli_vars = parse_cli_vars(cli_vars)

renderer = ProfileRenderer(cli_vars)

# in order to call dbt's internal profile rendering, we need to set the
# flags global. This is a bit of a hack, but it's the best way to do it.
from dbt.flags import set_from_args
from argparse import Namespace

set_from_args(Namespace(), None)
return Profile.from_raw_profile_info(
profile,
profile_name,
Expand Down

0 comments on commit 8d3ace0

Please sign in to comment.