File: test_isp.py

package info (click to toggle)
pygeoip 0.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 240 kB
  • sloc: python: 1,835; makefile: 3
file content (14 lines) | stat: -rwxr-xr-x 342 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# -*- coding: utf-8 -*-
import unittest

import pygeoip
from tests.config import ISP_DB_PATH


class TestGeOIPISPFunctions(unittest.TestCase):
    def setUp(self):
        self.gi = pygeoip.GeoIP(ISP_DB_PATH)

    def testISPByAddr(self):
        isp = self.gi.isp_by_addr('70.46.123.145')
        self.assertEqual(isp, 'FDN Communications')