Ejemplo n.º 1
0
def test_gsettings():
    """GSettings should be storing data correctly"""
    Gst.reset('history')
    assert Gst.get('history')[0] == (34.5, 15.8, 2)

    MapView.set_zoom_level(2)
    MapView.center_on(12.3, 45.6)
    assert Gst.get_double('latitude') == 12.3
    assert Gst.get_double('longitude') == 45.6

    MapView.zoom_in()
    MapView.emit('realize')
    assert list(Gst.get('history')) == [(34.5, 15.8, 2), (12.3, 45.6, 3)]
Ejemplo n.º 2
0
def test_gsettings():
    """GSettings should be storing data correctly"""
    Gst.reset("history")
    assert Gst.get("history")[0] == (34.5, 15.8, 2)

    MapView.set_zoom_level(2)
    MapView.center_on(12.3, 45.6)
    assert Gst.get_double("latitude") == 12.3
    assert Gst.get_double("longitude") == 45.6

    MapView.zoom_in()
    MapView.emit("realize")
    assert list(Gst.get("history")) == [(34.5, 15.8, 2), (12.3, 45.6, 3)]