예제 #1
0
def test_geohash_success():
    assert handler.geohash(37.421542, -122.085589, b'2005-05-26-10458.68') == {
        'latitude': 37.857713,
        'longitude': -122.544543
    }
예제 #2
0
def test_geohash_no_coord():
    with pytest.raises(TypeError):
        assert handler.geohash(None, None, b'2005-05-26-10458.68') is None
예제 #3
0
def test_geohash_no_date():
    with pytest.raises(TypeError):
        assert handler.geohash(37.421542, -122.085589, None) is None
예제 #4
0
def test_geohash_string():
    with pytest.raises(TypeError):
        assert handler.geohash(37.421542, -122.085589,
                               '2005-05-26-10458.68') is None