Exemplo n.º 1
0
def test_maps_list(app, db):
    assert (len(Map.all()) == 0)
    assert (_count_maps(app) == 0)

    db.session.add(Map('foo-list', published=True, bbox=[1, 1, 1, 1]))
    db.session.commit()

    assert (len(Map.all()) == 1)
    assert (_count_maps(app) == 1)
Exemplo n.º 2
0
def maps():
    return jsonify([m.to_dict() for m in Map.all()])