kopia lustrzana https://github.com/glidernet/ogn-python
Drop get_airports "Test"
rodzic
c9c464986c
commit
81b80559e4
|
@ -1,7 +1,7 @@
|
||||||
import unittest
|
import unittest
|
||||||
import unittest.mock as mock
|
import unittest.mock as mock
|
||||||
|
|
||||||
from ogn.utils import get_ddb, get_trackable, get_country_code, get_airports
|
from ogn.utils import get_ddb, get_trackable, get_country_code
|
||||||
from ogn.model import AddressOrigin
|
from ogn.model import AddressOrigin
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,10 +45,6 @@ class TestStringMethods(unittest.TestCase):
|
||||||
country_code = get_country_code(latitude, longitude)
|
country_code = get_country_code(latitude, longitude)
|
||||||
self.assertEqual(country_code, None)
|
self.assertEqual(country_code, None)
|
||||||
|
|
||||||
def test_get_airports(self):
|
|
||||||
airports = get_airports('tests/Germany.cup')
|
|
||||||
self.assertGreater(len(airports), 100)
|
|
||||||
|
|
||||||
@mock.patch('ogn.utils.Nominatim')
|
@mock.patch('ogn.utils.Nominatim')
|
||||||
def test_gec_country_code_exception(self, nominatim_mock):
|
def test_gec_country_code_exception(self, nominatim_mock):
|
||||||
from geopy.exc import GeocoderTimedOut
|
from geopy.exc import GeocoderTimedOut
|
||||||
|
|
Ładowanie…
Reference in New Issue