summaryrefslogtreecommitdiff
path: root/test_tablib.py
diff options
context:
space:
mode:
authorMike Waldner <mwaldner@gilt.com>2011-08-07 19:19:54 -0400
committerMike Waldner <mwaldner@gilt.com>2011-08-07 19:19:54 -0400
commita2b4e4c6ba6315571e476b09f69312c7d5788e45 (patch)
tree663b4ef9c298cbd8d4ad6d350c8c94e5430af1c8 /test_tablib.py
parent33a83316df627f49e95c744c6ceb87ff051ddbf7 (diff)
downloadtablib-a2b4e4c6ba6315571e476b09f69312c7d5788e45.tar.gz
Replace None with empty string before creating td
Diffstat (limited to 'test_tablib.py')
-rwxr-xr-xtest_tablib.py20
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."""