-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
HTTPXMock
testing and drop Python 3.8 support (#298)
* Test static data requests. * Update python version and dependencies * Move pytest-httpx to dev dependencies * Removing further references to using 3.8 * poetry update * restructure test folder * add static data for service history --------- Co-authored-by: GitOldGrumpy <[email protected]> Co-authored-by: Simon Hörrle <[email protected]>
- Loading branch information
1 parent
43c8189
commit 1a17a62
Showing
38 changed files
with
2,011 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
- name: "🐍 Set up Python" | ||
uses: "actions/setup-python@v5" | ||
with: | ||
python-version: 3.8 | ||
python-version: 3.9 | ||
- name: "⚙️ Install Poetry" | ||
uses: "abatilo/[email protected]" | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
"""Need for pytest or else it will cause an import error in pytest.""" | ||
|
||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
from mytoyota.controller import CACHE_FILENAME | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def data_folder(request) -> str: | ||
"""Return the folder containing test files.""" | ||
return str(Path(request.module.__file__).parent / "data") | ||
|
||
|
||
@pytest.fixture(scope="function") | ||
def remove_cache() -> None: | ||
"""Remove the credentials cache file if it exists.""" | ||
# Remove cache file if exists | ||
Path.unlink(CACHE_FILENAME, missing_ok=True) |
Oops, something went wrong.