diff options
| author | Brad Pitcher <bradpitcher@gmail.com> | 2014-04-30 16:48:12 -0700 |
|---|---|---|
| committer | Brad Pitcher <bradpitcher@gmail.com> | 2014-05-01 08:12:39 -0700 |
| commit | 49d8cb816f163ab5239ec9552c5d60cd0e386557 (patch) | |
| tree | eb9d77d2109dd17b1a4ea4f5dec4b1fd7ba45126 /test_tablib.py | |
| parent | fbd277ff2ef96343fa4bb41e5fff6c37af674951 (diff) | |
| download | tablib-49d8cb816f163ab5239ec9552c5d60cd0e386557.tar.gz | |
allow csv fields to have multiple lines
Diffstat (limited to 'test_tablib.py')
| -rwxr-xr-x | test_tablib.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test_tablib.py b/test_tablib.py index 4364d7b..78d1045 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -421,6 +421,22 @@ class TablibTestCase(unittest.TestCase): self.assertEqual(_csv, data.csv) + def test_csv_import_set_with_newlines(self): + """Generate and import CSV set serialization when row values have + newlines.""" + data.append(('Markdown\n=======', + 'A cool language\n\nwith paragraphs')) + data.append(('reStructedText\n==============', + 'Another cool language\n\nwith paragraphs')) + data.headers = ('title', 'body') + + _csv = data.csv + + data.csv = _csv + + self.assertEqual(_csv, data.csv) + + def test_tsv_import_set(self): """Generate and import TSV set serialization.""" data.append(self.john) |
