diff options
| author | Mike Waldner <mwaldner@gilt.com> | 2011-08-07 19:19:54 -0400 |
|---|---|---|
| committer | Mike Waldner <mwaldner@gilt.com> | 2011-08-07 19:19:54 -0400 |
| commit | a2b4e4c6ba6315571e476b09f69312c7d5788e45 (patch) | |
| tree | 663b4ef9c298cbd8d4ad6d350c8c94e5430af1c8 /test_tablib.py | |
| parent | 33a83316df627f49e95c744c6ceb87ff051ddbf7 (diff) | |
| download | tablib-a2b4e4c6ba6315571e476b09f69312c7d5788e45.tar.gz | |
Replace None with empty string before creating td
Diffstat (limited to 'test_tablib.py')
| -rwxr-xr-x | test_tablib.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test_tablib.py b/test_tablib.py index 48990a7..1ad514a 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -224,6 +224,26 @@ class TablibTestCase(unittest.TestCase): self.assertEqual(html, self.founders.html) + def test_html_export_none_value(self): + """HTML export""" + + html = markup.page() + html.table.open() + html.thead.open() + + html.tr(markup.oneliner.th(['foo','', 'bar'])) + html.thead.close() + + html.tr(markup.oneliner.td(['foo','', 'bar'])) + + html.table.close() + html = str(html) + + headers = ['foo', None, 'bar']; + d = tablib.Dataset(['foo', None, 'bar'], headers=headers) + + self.assertEqual(html, d.html) + def test_unicode_append(self): """Passes in a single unicode charecter and exports.""" |
