class ConsoleWriterTest(unittest.TestCase): def setUp(self): self.options = {'log_level': 'DEBUG', 'logger_name': 'export-pipeline'} self.writer = ConsoleWriter(self.options, meta()) def tearDown(self): self.writer.close() def test_write_console(self): items_to_write = [] for i in range(0, 10): item = BaseRecord() item['key'] = i item['value'] = random.randint(0, 10000) items_to_write.append(item) self.writer.write_batch(items_to_write) self.assertEqual(self.writer.get_metadata('items_count'), 10)
class ConsoleWriterTest(unittest.TestCase): def setUp(self): self.options = { 'log_level': 'DEBUG', 'logger_name': 'export-pipeline' } self.writer = ConsoleWriter(self.options, meta()) def tearDown(self): self.writer.close() def test_write_console(self): items_to_write = [] for i in range(0, 10): item = BaseRecord() item['key'] = i item['value'] = random.randint(0, 10000) items_to_write.append(item) self.writer.write_batch(items_to_write) self.assertEqual(self.writer.get_metadata('items_count'), 10)
def setUp(self): self.options = { 'log_level': 'DEBUG', 'logger_name': 'export-pipeline' } self.writer = ConsoleWriter(self.options, meta())
def setUp(self): self.options = {'log_level': 'DEBUG', 'logger_name': 'export-pipeline'} self.writer = ConsoleWriter(self.options, meta())