Ejemplo n.º 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
    }
Ejemplo n.º 2
0
def test_geohash_no_coord():
    with pytest.raises(TypeError):
        assert handler.geohash(None, None, b'2005-05-26-10458.68') is None
Ejemplo n.º 3
0
def test_geohash_no_date():
    with pytest.raises(TypeError):
        assert handler.geohash(37.421542, -122.085589, None) is None
Ejemplo n.º 4
0
def test_geohash_string():
    with pytest.raises(TypeError):
        assert handler.geohash(37.421542, -122.085589,
                               '2005-05-26-10458.68') is None