Skip to content

Commit

Permalink
Fix unit test for Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeshpremraj committed Jul 6, 2023
1 parent 095f0cf commit d873c4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ install_requires =
markupsafe>=1.1.1
marshmallow-oneofschema>=2.0.1
mdit-py-plugins>=0.3.0
mock>=5.0.2;python_version<="3.7"
# Pip can not find a version that satisfies constraints if opentelemetry-api is not pinned.
opentelemetry-api==1.15.0
opentelemetry-exporter-otlp
Expand Down
7 changes: 6 additions & 1 deletion tests/providers/http/hooks/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@
import json
import logging
import os
import sys
from collections import OrderedDict
from http import HTTPStatus
from unittest import mock

if sys.version_info.major == 3 and sys.version_info.minor >= 8:
from unittest import mock
else:
from unittest import mock

import pytest
import requests
Expand Down

0 comments on commit d873c4c

Please sign in to comment.