Skip to content

Commit

Permalink
override jinja context properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed May 8, 2023
1 parent 43ba24f commit e56538d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/dbt/context/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1500,9 +1500,11 @@ def generate_runtime_unit_test_context(

if unit_test.overrides and unit_test.overrides.macros:
for macro_name, macro_value in unit_test.overrides.macros.items():
macro_generator = ctx_dict.get(macro_name)
if macro_generator:
ctx_dict[macro_name] = UnitTestMacroGenerator(macro_generator, macro_value)
context_value = ctx_dict.get(macro_name)
if isinstance(context_value, MacroGenerator):
ctx_dict[macro_name] = UnitTestMacroGenerator(context_value, macro_value)
else:
ctx_dict[macro_name] = macro_value
return ctx_dict


Expand Down

0 comments on commit e56538d

Please sign in to comment.