waybackpy/tests/test_utils.py
eggplants e61447effd
Format and lint codes and fix packaging (#125)
* add: configure files (setup.py->setup.py+setup.cfg+pyproject.toml)

* add: __download_url__

* format with black and isort

* fix: flake8 section in setup.cfg

* add: E501 to flake ignore

* fix: metadata.name does not accept attr

* fix: merge __version__.py into __init__.py

* fix: flake8 errors in tests/

* fix: datetime.datetime -> datetime

* fix: banner

* fix: ignore W605 for banner

* fix: way to install deps in CI

* add: versem to setuptools

* fix: drop python<=3.6 (#126) from package and CI
2022-02-03 19:13:39 +05:30

19 lines
443 B
Python

from waybackpy import __version__
from waybackpy.utils import (
DEFAULT_USER_AGENT,
latest_version_github,
latest_version_pypi,
)
def test_default_user_agent():
assert (
DEFAULT_USER_AGENT
== "waybackpy %s - https://github.com/akamhy/waybackpy" % __version__
)
def test_latest_version():
package_name = "waybackpy"
assert latest_version_github(package_name) == latest_version_pypi(package_name)