File: test_netspeed_cell.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 (15 lines) | stat: -rwxr-xr-x 383 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- coding: utf-8 -*-
import unittest

import pygeoip
from tests.config import NETSPEEDCELL_DB_PATH


class TestGeoIPNetspeedCellFunctions(unittest.TestCase):

    def setUp(self):
        self.gi = pygeoip.GeoIP(NETSPEEDCELL_DB_PATH)

    def testNetSpeedByAddrWrapper(self):
        netspeed = self.gi.netspeed_by_addr('2.125.160.1')
        self.assertEqual(netspeed, 'Dialup')