summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-04-18 13:19:13 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-04-18 13:40:23 -0500
commitd2a4c9938e43aa6de9e54a150fad44650af6a7e1 (patch)
treeb11c2a5ab356486c7f76ebee212850c4bc7dc3e7 /tests/conftest.py
parent1114085dbb38be59ecb862f77e752772d7b55ca1 (diff)
downloadrequests-cache-d2a4c9938e43aa6de9e54a150fad44650af6a7e1.tar.gz
Add links to source files on Examples page
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 7de9b6d..dc77368 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -12,7 +12,7 @@ import os
from datetime import datetime, timedelta
from functools import wraps
from logging import basicConfig, getLogger
-from os.path import abspath, dirname, join
+from pathlib import Path
from unittest.mock import MagicMock
from uuid import uuid4
@@ -66,9 +66,9 @@ MOCKED_URL_404 = 'http+mock://requests-cache.com/nonexistent'
MOCKED_URL_500 = 'http+mock://requests-cache.com/answer?q=this-statement-is-false'
MOCK_PROTOCOLS = ['mock://', 'http+mock://', 'https+mock://']
-PROJECT_DIR = abspath(dirname(dirname(__file__)))
-SAMPLE_DATA_DIR = join(PROJECT_DIR, 'tests', 'sample_data')
-SAMPLE_CACHE_FILES = [join(SAMPLE_DATA_DIR, path) for path in os.listdir(SAMPLE_DATA_DIR)]
+PROJECT_DIR = Path(__file__).parent.parent.absolute()
+SAMPLE_DATA_DIR = PROJECT_DIR / 'tests' / 'sample_data'
+SAMPLE_CACHE_FILES = list(SAMPLE_DATA_DIR.glob('sample.db.*'))
AWS_OPTIONS = {
'endpoint_url': 'http://localhost:8000',