Skip to content

Fix deprecation warnings for botocore use of datetime.now(). #26

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
python -m pip install -r requirements-tests.txt --no-deps
- name: Run tests
run: |
python -m unittest discover .
python -W error -m unittest --verbose
11 changes: 11 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import unittest
import unittest.mock
import urllib.parse
import warnings

try:
from dateutil.tz import tzlocal
Expand All @@ -35,6 +36,16 @@
from examples.xkcd import ComicVersion, XKCDResource


def setUpModule() -> None:
"""Code to run before any single test in the module is run."""
warnings.filterwarnings("ignore", category=DeprecationWarning, module="botocore.auth")


def tearDownModule() -> None:
"""Code to run after every single test in the module has been run."""
warnings.filterwarnings("default", category=DeprecationWarning, module="botocore.auth")


class MockedTextResponse:
"""
Represents a mocked requests.Response object containing a body.
Expand Down
Loading