File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -148,3 +148,15 @@ async def test_get_batch_details_total_timeout(batch_size):
148148 ips , batch_size = batch_size , timeout_total = 0.001
149149 )
150150 await handler .deinit ()
151+
152+
153+ #############
154+ # BOGON TESTS
155+ #############
156+
157+
158+ async def test_bogon_details ():
159+ token = os .environ .get ("IPINFO_TOKEN" , "" )
160+ handler = AsyncHandler (token )
161+ details = await handler .getDetails ("127.0.0.1" )
162+ assert details .all == {'bogon' : True , 'ip' : '127.0.0.1' }
Original file line number Diff line number Diff line change @@ -150,3 +150,16 @@ def test_get_map():
150150 handler = Handler ()
151151 mapUrl = handler .getMap (open ("tests/map-ips.txt" ).read ().splitlines ())
152152 print (f"got URL={ mapUrl } " )
153+
154+
155+ #############
156+ # BOGON TESTS
157+ #############
158+
159+
160+ def test_bogon_details ():
161+ token = os .environ .get ("IPINFO_TOKEN" , "" )
162+ handler = Handler (token )
163+ details = handler .getDetails ("127.0.0.1" )
164+ assert isinstance (details , Details )
165+ assert details .all == {'bogon' : True , 'ip' : '127.0.0.1' }
You can’t perform that action at this time.
0 commit comments