Skip to content

Commit

Permalink
Fixed cahcing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
aosingh committed May 9, 2023
1 parent 409b58c commit cff67cb
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/functional/adapter/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
"""
import pytest

from dbt.tests.adapter.caching.test_caching import (
BaseCachingTest,
BaseCachingLowercaseModel,
BaseCachingUppercaseModel,
BaseCachingSelectedSchemaOnly,
)
from dbt.tests.adapter.caching.test_caching import BaseCachingTest

from dbt.tests.util import run_dbt

model_sql = """
Expand Down Expand Up @@ -80,7 +76,7 @@ def models(self):
}


class TestCachingUppercaseModel(BaseCachingUppercaseModel):
class TestCachingUppercaseModel(OracleBaseCaching):

@pytest.fixture(scope="class")
def models(self):
Expand All @@ -89,11 +85,16 @@ def models(self):
}


class TestCachingSelectedSchemaOnly(BaseCachingSelectedSchemaOnly):
class TestCachingSelectedSchemaOnly(OracleBaseCaching):

@pytest.fixture(scope="class")
def models(self):
return {
"model.sql": model_sql,
"another_schema_model.sql": another_schema_model_sql,
}

def test_cache(self, project):
# this should only cache the schema containing the selected model
run_args = ["--cache-selected-only", "run", "--select", "model"]
self.run_and_inspect_cache(project, run_args)

0 comments on commit cff67cb

Please sign in to comment.