added minor test
authormichael <>
Wed, 18 Jun 2008 13:02:43 +0000 (13:02 +0000)
committermichael <>
Wed, 18 Jun 2008 13:02:43 +0000 (13:02 +0000)
tests/test_basic.py
tests/test_models.py

index 7b5cfab70b408abd311dd6019fe748cb97e633dd..08dd01596b1a3116b5683eed180c006243220214 100644 (file)
@@ -52,10 +52,16 @@ def test_basic():
     books = BookTable([\r
         {'id': 1, 'name': 'Foo: Bar'},\r
     ])\r
+\r
     # access without order_by works\r
     books.data\r
     books.rows\r
 \r
+    # make sure BoundColumnn.name always gives us the right thing, whether\r
+    # the column explicitely defines a name or not.\r
+    books.columns['count'].name == 'count'\r
+    books.columns['answer'].name == 'answer'\r
+\r
     for r in books.rows:\r
         # unknown fields are removed/not-accessible\r
         assert 'name' in r\r
index c58f91800a6c05cf06bdf73c553c94270bb31614..a9f2e71bf0ea3f024b0b1f94e2635103d48b4576 100644 (file)
@@ -159,5 +159,4 @@ def test_pagination():
 # TODO: pagination\r
 # TODO: support function column sources both for modeltables (methods on model) and static tables (functions in dict)\r
 # TODO: manual base columns change -> update() call (add as example in docstr here) -> rebuild snapshot: is row cache, column cache etc. reset?\r
-# TODO: test that boundcolumn.name works with name overrides and without\r
 # TODO: throw an exception on invalid order_by
\ No newline at end of file