diff options
| author | Iuri de Silvio <iurisilvio@gmail.com> | 2013-09-20 10:06:24 -0300 |
|---|---|---|
| committer | Iuri de Silvio <iurisilvio@gmail.com> | 2014-01-11 13:45:45 -0200 |
| commit | c8a5563309f6b580748183ac2c9cfad88dd8ebec (patch) | |
| tree | d44dff722104c88d741d5a2df33352e731297c55 /test_tablib.py | |
| parent | c225a64d684700b343882538d964016ec24c36d5 (diff) | |
| download | tablib-c8a5563309f6b580748183ac2c9cfad88dd8ebec.tar.gz | |
Maintain dataset title after sort.
Diffstat (limited to 'test_tablib.py')
| -rwxr-xr-x | test_tablib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test_tablib.py b/test_tablib.py index 4b4ad93..6125408 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -29,7 +29,7 @@ class TablibTestCase(unittest.TestCase): self.george = ('George', 'Washington', 67) self.tom = ('Thomas', 'Jefferson', 50) - self.founders = tablib.Dataset(headers=self.headers) + self.founders = tablib.Dataset(headers=self.headers, title='Founders') self.founders.append(self.john) self.founders.append(self.george) self.founders.append(self.tom) @@ -559,6 +559,7 @@ class TablibTestCase(unittest.TestCase): """Sort columns.""" sorted_data = self.founders.sort(col="first_name") + self.assertEqual(sorted_data.title, 'Founders') first_row = sorted_data[0] second_row = sorted_data[2] |
