File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11# fitbit_client/auth/callback_server.py
22
33# Standard library imports
4+ from datetime import UTC
45from datetime import datetime
56from datetime import timedelta
67from http .server import HTTPServer
@@ -106,8 +107,8 @@ def start(self) -> None:
106107 .issuer_name (issuer )
107108 .public_key (private_key .public_key ())
108109 .serial_number (x509 .random_serial_number ())
109- .not_valid_before (datetime .utcnow ( ))
110- .not_valid_after (datetime .utcnow ( ) + timedelta (days = 10 ))
110+ .not_valid_before (datetime .now ( UTC ))
111+ .not_valid_after (datetime .now ( UTC ) + timedelta (days = 10 ))
111112 .add_extension (
112113 x509 .SubjectAlternativeName ([x509 .DNSName (self .host )]), critical = False
113114 )
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ extensions = [
7777testpaths = [" tests" ]
7878minversion = 6.0
7979python_files = " test_*.py"
80- addopts = " -ra -q --cov=fitbit_client --cache-clear --cov-report=term-missing --cov-report=html:_cov_html -v --tb=native "
80+ addopts = " -ra -q --cov=fitbit_client --cache-clear --cov-report=term-missing --tb=native -W error::DeprecationWarning "
8181pythonpath = [" ." ]
8282
8383# https://pytest-cov.readthedocs.io/en/latest/config.html
You can’t perform that action at this time.
0 commit comments