1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

add get_parser tests

This commit is contained in:
Kelly Brazil
2024-01-06 18:29:40 -08:00
parent 8e9ff7fa9f
commit cae41df1d8

View File

@ -1,10 +1,20 @@
from copy import deepcopy
import unittest
from typing import Generator
from types import ModuleType
import jc.lib
import jc.parsers.csv as csv_parser
class MyTests(unittest.TestCase):
def test_lib_get_parser_string(self):
p = jc.lib.get_parser('arp')
self.assertIsInstance(p, ModuleType)
def test_lib_get_parser_module(self):
p = jc.lib.get_parser(csv_parser)
self.assertIsInstance(p, ModuleType)
def test_lib_parse_csv(self):
data = {
'': [],