d8cabdfdb5
* fix: CI yml name * add: mypy configuraion * add: type annotation to waybackpy modules * add: type annotation to test modules * fix: mypy command * add: types-requests to dev deps * fix: disable max-line-length * fix: move pytest.ini into setup.cfg * add: urllib3 to deps * fix: Retry (ref: https://github.com/python/typeshed/issues/6893) * fix: f-string * fix: shorten long lines * add: staticmethod decorator to no-self-use methods * fix: str(headers)->headers_str * fix: error message * fix: revert "str(headers)->headers_str" and ignore assignment CaseInsensitiveDict with str * fix: mypy error
19 lines
457 B
Python
19 lines
457 B
Python
from waybackpy import __version__
|
|
from waybackpy.utils import (
|
|
DEFAULT_USER_AGENT,
|
|
latest_version_github,
|
|
latest_version_pypi,
|
|
)
|
|
|
|
|
|
def test_default_user_agent() -> None:
|
|
assert (
|
|
DEFAULT_USER_AGENT
|
|
== f"waybackpy {__version__} - https://github.com/akamhy/waybackpy"
|
|
)
|
|
|
|
|
|
def test_latest_version() -> None:
|
|
package_name = "waybackpy"
|
|
assert latest_version_github(package_name) == latest_version_pypi(package_name)
|