diff options
| author | Jordan Cook <JWCook@users.noreply.github.com> | 2021-04-22 13:27:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-22 13:27:24 -0500 |
| commit | f2bf9bbfd8d711e9dfc8ccce83f439d765d484cb (patch) | |
| tree | fb617be7c7760390b7239899e6522d865956342f /requests_cache/backends/sqlite.py | |
| parent | 38ddcf5425eadc6b174a8b053b2175c4dda00a1f (diff) | |
| parent | 3ec85f0107caedbe3b3bd8080bd3dac81b7baa17 (diff) | |
| download | requests-cache-f2bf9bbfd8d711e9dfc8ccce83f439d765d484cb.tar.gz | |
Merge pull request #242 from JWCook/integration-tests
Refactor backend integration tests
Diffstat (limited to 'requests_cache/backends/sqlite.py')
| -rw-r--r-- | requests_cache/backends/sqlite.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/requests_cache/backends/sqlite.py b/requests_cache/backends/sqlite.py index 470d00c..9c98fcd 100644 --- a/requests_cache/backends/sqlite.py +++ b/requests_cache/backends/sqlite.py @@ -25,7 +25,6 @@ class DbCache(BaseCache): def __init__(self, db_path: Union[Path, str] = 'http_cache', fast_save: bool = False, **kwargs): super().__init__(**kwargs) - db_path = _get_db_path(db_path) self.responses = DbPickleDict(db_path, table_name='responses', fast_save=fast_save, **kwargs) self.redirects = DbDict(db_path, table_name='redirects', **kwargs) @@ -60,7 +59,7 @@ class DbDict(BaseStorage): kwargs.setdefault('suppress_warnings', True) super().__init__(**kwargs) self.connection_kwargs = get_valid_kwargs(sqlite_template, kwargs) - self.db_path = db_path + self.db_path = _get_db_path(db_path) self.fast_save = fast_save self.table_name = table_name @@ -144,9 +143,6 @@ class DbDict(BaseStorage): with self.connection(True) as con: con.execute("vacuum") - def __str__(self): - return str(dict(self.items())) - class DbPickleDict(DbDict): """Same as :class:`DbDict`, but pickles values before saving""" |
