File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232
3333_REQUEST_UA = f"minFraud-API/{ __version__ } { requests .utils .default_user_agent ()} "
3434
35+ # We have this so that we can avoid a mocket issue:
36+ # https://github.com/mindflayer/python-mocket/issues/209
37+ _SCHEME = "https"
38+
3539
3640# pylint: disable=too-many-instance-attributes, missing-class-docstring
3741class BaseClient :
@@ -58,7 +62,7 @@ def __init__(
5862 self ._license_key = license_key
5963 self ._timeout = timeout
6064
61- base_uri = f"https ://{ host } /minfraud/v2.0"
65+ base_uri = f"{ _SCHEME } ://{ host } /minfraud/v2.0"
6266 self ._score_uri = "/" .join ([base_uri , "score" ])
6367 self ._insights_uri = "/" .join ([base_uri , "insights" ])
6468 self ._factors_uri = "/" .join ([base_uri , "factors" ])
Original file line number Diff line number Diff line change 1919from minfraud .models import Factors , Insights , Score
2020from minfraud .webservice import AsyncClient , Client
2121
22+ import minfraud .webservice
2223import unittest
2324
25+ # We have this so that we can avoid a mocket issue:
26+ # https://github.com/mindflayer/python-mocket/issues/209
27+ minfraud .webservice ._SCHEME = "http"
28+
2429
2530class BaseTest (unittest .TestCase ):
2631 client_class : Union [Type [AsyncClient ], Type [Client ]] = Client
@@ -36,7 +41,7 @@ def setUp(self):
3641 with open (os .path .join (test_dir , self .response_file ), encoding = "utf-8" ) as file :
3742 self .response = file .read ()
3843
39- base_uri = "https ://minfraud.maxmind.com/minfraud/v2.0"
44+ base_uri = "http ://minfraud.maxmind.com/minfraud/v2.0"
4045
4146 @httprettified
4247 def test_invalid_auth (self ):
You can’t perform that action at this time.
0 commit comments