From: Michael Elsdörfer Date: Wed, 18 Jun 2008 13:02:43 +0000 (+0000) Subject: added minor test X-Git-Tag: 0.2~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=870ec33bb2fc6917c1367f2693fd94d4b359886c;p=django-tables2.git added minor test --- 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