-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from shaiu/shaiu/fix-tests
fix tests
- Loading branch information
Showing
17 changed files
with
183 additions
and
82 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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"""Run an example script to quickly test a 17track.net account.""" | ||
|
||
import asyncio | ||
import logging | ||
|
||
|
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
"""Define module-level imports.""" | ||
|
||
from .client import Client # noqa |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,40 @@ | ||
aiohttp>=3.8.0 | ||
aresponses==1.1.2 | ||
aiohttp==3.9.5 | ||
aioresponses==0.7.6 | ||
aiosignal==1.3.1 | ||
aresponses==3.0.0 | ||
astroid==3.2.3 | ||
attrs==23.2.0 | ||
cfgv==3.4.0 | ||
coverage==7.5.4 | ||
dill==0.3.8 | ||
distlib==0.3.8 | ||
filelock==3.15.4 | ||
frozenlist==1.4.1 | ||
identify==2.6.0 | ||
idna==3.7 | ||
iniconfig==2.0.0 | ||
isort==5.13.2 | ||
mccabe==0.7.0 | ||
multidict==6.0.5 | ||
mypy==1.10.1 | ||
mypy-extensions==1.0.0 | ||
nodeenv==1.9.1 | ||
packaging==24.1 | ||
platformdirs==4.2.2 | ||
pluggy==1.5.0 | ||
pre-commit==3.7.1 | ||
py==1.11.0 | ||
pylint==3.2.5 | ||
pytest==8.2.2 | ||
pytest-aiohttp==0.3.0 | ||
pytest-asyncio==0.23.7 | ||
pytest-cov==2.8.1 | ||
pytest==6.2.5 | ||
pytz>=2021.1 | ||
pytz==2024.1 | ||
PyYAML==6.0.1 | ||
ruff==0.5.1 | ||
toml==0.10.2 | ||
tomlkit==0.13.0 | ||
types-pytz==2024.1.0.20240417 | ||
typing_extensions==4.12.2 | ||
virtualenv==20.26.3 | ||
yarl==1.9.4 |
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,30 @@ | ||
#!/usr/bin/env sh | ||
set -eu | ||
|
||
# Used in venv activate script. | ||
# Would be an error if undefined. | ||
OSTYPE="${OSTYPE-}" | ||
|
||
# Activate pyenv and virtualenv if present, then run the specified command | ||
|
||
# pyenv, pyenv-virtualenv | ||
if [ -s .python-version ]; then | ||
PYENV_VERSION=$(head -n 1 .python-version) | ||
export PYENV_VERSION | ||
fi | ||
|
||
if [ -n "${VIRTUAL_ENV-}" ] && [ -f "${VIRTUAL_ENV}/bin/activate" ]; then | ||
. "${VIRTUAL_ENV}/bin/activate" | ||
else | ||
# other common virtualenvs | ||
my_path=$(git rev-parse --show-toplevel) | ||
|
||
for venv in venv .venv .; do | ||
if [ -f "${my_path}/${venv}/bin/activate" ]; then | ||
. "${my_path}/${venv}/bin/activate" | ||
break | ||
fi | ||
done | ||
fi | ||
|
||
exec "$@" |
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 |
---|---|---|
@@ -1,10 +1,21 @@ | ||
"""Define common test utilities.""" | ||
|
||
import os | ||
|
||
import pytest | ||
from aresponses import ResponsesMockServer # type: ignore | ||
|
||
TEST_EMAIL = "[email protected]" | ||
TEST_PASSWORD = "password" | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
async def aresponses(loop): | ||
"""replace aresponses""" | ||
async with ResponsesMockServer(loop=loop) as server: | ||
yield server | ||
|
||
|
||
def load_fixture(filename): | ||
"""Load a fixture.""" | ||
path = os.path.join(os.path.dirname(__file__), "fixtures", filename) | ||
|
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
Oops, something went wrong.