assert books.page.has_previous() == False\r
assert books.page.has_next() == True\r
\r
+# TODO: all the column stuff might warrant it's own test file\r
def test_columns():\r
- """Test specific column features.\r
+ """Test Table.columns container functionality.\r
+ """\r
+\r
+ class BookTable(tables.Table):\r
+ id = tables.Column(sortable=False)\r
+ name = tables.Column(sortable=True)\r
+ pages = tables.Column(sortable=True)\r
+ language = tables.Column(sortable=False)\r
+ books = BookTable([])\r
\r
- Might warrant it's own test file."""\r
+ assert list(books.columns.sortable()) == [c for c in books.columns if c.sortable]\r
+\r
+\r
+def test_column_order():\r
+ """Test the order functionality of bound columns.\r
+ """\r
\r
class BookTable(tables.Table):\r
id = tables.Column()\r