From 870ec33bb2fc6917c1367f2693fd94d4b359886c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20Elsd=C3=B6rfer?= Date: Wed, 18 Jun 2008 13:02:43 +0000 Subject: [PATCH] added minor test --- tests/test_basic.py | 6 ++++++ tests/test_models.py | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index 7b5cfab..08dd015 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -52,10 +52,16 @@ def test_basic(): books = BookTable([ {'id': 1, 'name': 'Foo: Bar'}, ]) + # access without order_by works books.data books.rows + # make sure BoundColumnn.name always gives us the right thing, whether + # the column explicitely defines a name or not. + books.columns['count'].name == 'count' + books.columns['answer'].name == 'answer' + for r in books.rows: # unknown fields are removed/not-accessible assert 'name' in r diff --git a/tests/test_models.py b/tests/test_models.py index c58f918..a9f2e71 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -159,5 +159,4 @@ def test_pagination(): # TODO: pagination # TODO: support function column sources both for modeltables (methods on model) and static tables (functions in dict) # TODO: manual base columns change -> update() call (add as example in docstr here) -> rebuild snapshot: is row cache, column cache etc. reset? -# TODO: test that boundcolumn.name works with name overrides and without # TODO: throw an exception on invalid order_by \ No newline at end of file -- 2.26.2