import unittest

from fgai.stream_profiles import parse_profiles


class StreamProfileTests(unittest.TestCase):
    def test_parses_field_level_profile(self):
        profiles = parse_profiles([{"stream_id": "dns", "entity_field": "IP", "categorical_fields": ["QH"], "numeric_fields": ["Elapsed"]}])
        self.assertEqual(profiles["dns"].entity_field, "IP")
        self.assertEqual(profiles["dns"].numeric_fields, ("Elapsed",))
