Skip to content

Commit

Permalink
don't fail for no owner
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db committed Mar 7, 2025
1 parent ab6065b commit 87dffb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions tests/functional/adapter/basic/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@
union all
select cast(2 as bigint) as id, 'goodbye' as msg
"""


class AnyStringOrNone:
"""Any string. Use this in assert calls"""

def __eq__(self, other):
return isinstance(other, str) or other is None
6 changes: 3 additions & 3 deletions tests/functional/adapter/basic/test_docs_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from dbt.tests.adapter.basic import expected_catalog
from dbt.tests.adapter.basic.test_docs_generate import BaseDocsGenerate, BaseDocsGenReferences
from dbt.tests.util import AnyString
from tests.functional.adapter.basic.fixtures import AnyStringOrNone
from tests.functional.adapter.basic.typing import AnyLongType, StatsLikeDict


Expand All @@ -11,7 +11,7 @@ class TestDocsGenerate(BaseDocsGenerate):
def expected_catalog(self, project):
return expected_catalog.base_expected_catalog(
project,
role=AnyString(),
role=AnyStringOrNone(),
id_type=AnyLongType(),
text_type="string",
time_type="timestamp",
Expand All @@ -26,7 +26,7 @@ class TestDocsGenReferences(BaseDocsGenReferences):
def expected_catalog(self, project):
return self.expected_references_catalog(
project,
role=AnyString(),
role=AnyStringOrNone(),
id_type=AnyLongType(),
text_type="string",
time_type="timestamp",
Expand Down

0 comments on commit 87dffb3

Please sign in to comment.