Exemplo n.º 1
0
    def test_get_all_lists(self):
        lists = get_all(self.session)

        assert len(lists) is 2
        
        for lst in lists:
            assert len(lst.entries) > 0
Exemplo n.º 2
0
    def test_delete_list(self):
        assert len(get_all(self.session)) is 2

        delete(self.session, 1)

        assert len(get_all(self.session)) is 1
Exemplo n.º 3
0
def list_index():
    session = Session()
    lsts = lists.get_all(session)
    return render_template('list_index.html', lists=lsts)
Exemplo n.º 4
0
def get_list_index():
    """Returns a list of all Lists in the db, in the form of a JSON object"""
    session = Session()
    return jsonify(lists.get_all(session))