ogn-python/tests/test_ognutils.py

15 wiersze
449 B
Python
Czysty Zwykły widok Historia

2015-11-06 21:34:19 +00:00
import unittest
from ogn.ognutils import get_devices_from_ddb, get_country_code
class TestStringMethods(unittest.TestCase):
def test_get_devices_from_ddb(self):
devices = get_devices_from_ddb()
self.assertGreater(len(devices), 1000)
def test_get_country_code(self):
latitude = 48.0
longitude = 11.0
country_code = get_country_code(latitude, longitude)
self.assertEquals(country_code, 'de')