File: test_org.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 344 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 ORG_DB_PATH


class TestGeoIPOrgFunctions(unittest.TestCase):
    def setUp(self):
        self.gi = pygeoip.GeoIP(ORG_DB_PATH)

    def testOrgByAddr(self):
        org = self.gi.org_by_addr('70.46.123.145')
        self.assertEqual(org, 'DSLAM WAN Allocation')