Skip to content

Commit

Permalink
Remove no longer needed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
QMalcolm committed Jun 7, 2023
1 parent 4c87b1b commit 94b2589
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 50 deletions.
7 changes: 0 additions & 7 deletions tests/functional/groups/test_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@
type_params:
measure:
name: "people"
model: "ref('people_model')"
meta:
my_meta: 'testing'
config:
Expand Down Expand Up @@ -218,9 +217,3 @@ def test_access_attribute(self, project):
manifest = get_manifest(project.project_root)
metric_id = "metric.test.number_of_people"
assert manifest.metrics[metric_id].group == "analytics"

# Change group of metric
write_file(v2_people_metric_yml, "models", "people_metric.yml")
# Should raise a reference error
with pytest.raises(DbtReferenceError):
run_dbt(["run"])
15 changes: 0 additions & 15 deletions tests/functional/metrics/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,21 +532,6 @@
my_meta: 'testing'
"""

metric_without_timestamp_or_timegrains_yml = """
version: 2
metrics:
- name: number_of_people
label: "Number of people"
description: Total count of people
type: simple
type_params:
measure:
name: people
meta:
my_meta: 'testing'
"""

invalid_metric_without_timestamp_with_time_grains_yml = """
version: 2
Expand Down
28 changes: 0 additions & 28 deletions tests/functional/metrics/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
downstream_model_sql,
invalid_derived_metric_contains_model_yml,
derived_metric_yml,
metric_without_timestamp_or_timegrains_yml,
invalid_metric_without_timestamp_with_time_grains_yml,
invalid_metric_without_timestamp_with_window_yml,
)
Expand Down Expand Up @@ -49,33 +48,6 @@ def test_simple_metric(
assert metric_ids == expected_metric_ids


class TestSimpleMetricsNoTimestamp:
@pytest.fixture(scope="class")
def models(self):
return {
"people_metrics.yml": metric_without_timestamp_or_timegrains_yml,
"people.sql": models_people_sql,
}

def test_simple_metric_no_timestamp(
self,
project,
):
# initial run
results = run_dbt(["run"])
assert len(results) == 1
manifest = get_manifest(project.project_root)
metric_ids = list(manifest.metrics.keys())
expected_metric_ids = [
"metric.test.number_of_people",
]
assert metric_ids == expected_metric_ids

# make sure the 'expression' metric depends on the two upstream metrics
metric_test = manifest.metrics["metric.test.number_of_people"]
assert metric_test.timestamp is None


class TestInvalidRefMetrics:
@pytest.fixture(scope="class")
def models(self):
Expand Down

0 comments on commit 94b2589

Please sign in to comment.