Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 def test_get_file_processor_unknown(self):
     store = Store()
     with self.assertRaises(Exception):
         store.get_file_processor("UNKNOWN")
Example #4
0
 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)