@@ 367-381 (lines=15) @@ | ||
364 | log_data(expected, actual) |
|
365 | self.assertListEqual(expected, actual) |
|
366 | ||
367 | @unittest.skipUnless(os.getenv(ENV), REASON) |
|
368 | def test_import_xlsx(self): |
|
369 | """Verify items can be imported from an XLSX file.""" |
|
370 | path = os.path.join(self.temp, 'exported.xlsx') |
|
371 | core.exporter.export(self.document, path) |
|
372 | _path = os.path.join(self.temp, 'imports', 'req') |
|
373 | _tree = _get_tree() |
|
374 | document = _tree.create_document(_path, 'REQ') |
|
375 | # Act |
|
376 | core.importer.import_file(path, document) |
|
377 | # Assert |
|
378 | expected = [item.data for item in self.document.items] |
|
379 | actual = [item.data for item in document.items] |
|
380 | log_data(expected, actual) |
|
381 | self.assertListEqual(expected, actual) |
|
382 | ||
383 | # TODO: determine when this test should be run (if at all) |
|
384 | # currently, 'TEST_LONG' isn't set under any condition |
|
@@ 337-350 (lines=14) @@ | ||
334 | log_data(expected, actual) |
|
335 | self.assertListEqual(expected, actual) |
|
336 | ||
337 | def test_import_csv(self): |
|
338 | """Verify items can be imported from a CSV file.""" |
|
339 | path = os.path.join(self.temp, 'exported.csv') |
|
340 | core.exporter.export(self.document, path) |
|
341 | _path = os.path.join(self.temp, 'imports', 'req') |
|
342 | _tree = _get_tree() |
|
343 | document = _tree.create_document(_path, 'REQ') |
|
344 | # Act |
|
345 | core.importer.import_file(path, document) |
|
346 | # Assert |
|
347 | expected = [item.data for item in self.document.items] |
|
348 | actual = [item.data for item in document.items] |
|
349 | log_data(expected, actual) |
|
350 | self.assertListEqual(expected, actual) |
|
351 | ||
352 | def test_import_tsv(self): |
|
353 | """Verify items can be imported from a TSV file.""" |