Testing The CSV StorageΒΆ

This tests the csv-storage. It’s assumed that the DictWriter will be the main interface, not the regular writer.

TestCsvStorage.test_constructor() Does it take the expected fields?
TestCsvStorage.test_path_only() Does it create the storage if only the path is given?
TestCsvStorage.test_bad_constructor() Does it raise an error if neither path nor storage are given?
TestCsvStorage.test_writerow() Does it write the row?
TestCsvStorage.test_open() Does it open a file with the given filename?
TestCsvStorage.test_writerows() Does it write each dict in the list?
TestCsvStorage.test_writer() Does it create a new DictWriter if the file-storage allows it?
Parameter Tests
Path Header Storage Expected Outcome
None None None ApeError
None None storage ApeError
None header None ApeError
None header storage header and rows written to storage
path None None ApeError
path None storage ApeError
path header None header and rows written to new storage
path header storage header and rows written to storage

Navigation