def test_get_file_processor_csv(self): store = Store() self.assertIsInstance( store.get_file_processor( Store.CSV_FORMAT, os.path.dirname(__file__) + os.sep + "test.csv"), CSVFileReader)
def test_get_file_processor_other(self): store = Store() with self.assertRaises(Exception): self.assertIsInstance( store.get_file_processor( "other", os.path.dirname(__file__) + os.sep + "test.csv"), CSVFileReader)
def test_get_file_processor_unknown(self): store = Store() with self.assertRaises(Exception): store.get_file_processor("UNKNOWN")
def test_get_file_processor_text(self): store = Store() self.assertIsInstance( store.get_file_processor( Store.TEXT_FORMAT, os.path.dirname(__file__) + os.sep + "test.txt"), TextFile)