예제 #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
예제 #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
예제 #3
0
파일: web.py 프로젝트: noahgoldman/textlink
def list_index():
    session = Session()
    lsts = lists.get_all(session)
    return render_template('list_index.html', lists=lsts)
예제 #4
0
파일: api.py 프로젝트: noahgoldman/textlink
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))