Skip to content

Commit

Permalink
Generalise vcr cassettes path
Browse files Browse the repository at this point in the history
  • Loading branch information
lmazz1-dbt committed Dec 7, 2024
1 parent 251b6c8 commit 1f549d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/client/test_handler.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from functools import wraps
from os import path
from pathlib import Path

from matchbox.client._handler import get_resolution_graph
from vcr import use_cassette


def vcr_cassette(func):
test_dir = Path(__file__).resolve().parents[1]
cassette_name = f"{func.__name__}.yaml"
path.join(test_dir, "fixtures", cassette_name)

@wraps(func)
@use_cassette(f"test/fixtures/vcr_cassettes/{func.__name__}.yaml")
def wrapper(*args, **kwargs):
Expand Down

0 comments on commit 1f549d0

Please sign in to comment.