Skip to content

Commit

Permalink
minor update trying to fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
McKnight-42 committed Jul 6, 2022
1 parent ab6be85 commit da557d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion core/dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class BaseAdapter(metaclass=AdapterMeta):
- convert_datetime_type
- convert_date_type
- convert_time_type
- standardize_grants_dict
Macros:
- get_catalog
Expand Down Expand Up @@ -538,13 +539,21 @@ def list_relations_without_caching(self, schema_relation: BaseRelation) -> List[
"`list_relations_without_caching` is not implemented for this " "adapter!"
)

###
# Abstract methods about grants
###
@abc.abstractmethod
def standardize_grants_dict(cls, grants_table: agate.Table) -> dict:
def standardize_grants_dict(self, grants_table: agate.Table) -> dict:
"""Translate the result of `show grants` (or equivalent) to match the
grants which a user would configure in their project.
If relevant -- filter down to grants made BY the current user role,
and filter OUT any grants TO the current user/role (e.g. OWNERSHIP).
:param grants_table: An agate table containing the query result of
the SQL returned by get_show_grant_sql
:return: A standardized dictionary matching the `grants` config
:rtype: dict
"""
raise NotImplementedException(
"`standardize_grants_dict` is not implemented for this adapter!"
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def assert_has_keys(required_keys: Set[str], maybe_keys: Set[str], ctx: Dict[str
"modules",
"flags",
"print",
"diff_of_two_dicts",
"diff_of_two_dicts"
}
)

Expand Down

0 comments on commit da557d9

Please sign in to comment.