add value-shape field classification and auto-apply
Field roles are now inferred from observed values instead of names, with src/dst disambiguation, value-pattern detector hints, an Ollama advisor scoped to ambiguous fields only, confidence-gated auto-apply with manual-field protection, and drift flagging for review
This commit is contained in:
21
tests/test_entities.py
Normal file
21
tests/test_entities.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import unittest
|
||||
|
||||
from fgai.entities import is_public_ip
|
||||
|
||||
|
||||
class EntitiesTests(unittest.TestCase):
|
||||
def test_is_public_ip_true_for_global_address(self):
|
||||
self.assertTrue(is_public_ip("8.8.8.8"))
|
||||
|
||||
def test_is_public_ip_false_for_private_address(self):
|
||||
self.assertFalse(is_public_ip("10.0.0.5"))
|
||||
self.assertFalse(is_public_ip("192.168.1.1"))
|
||||
|
||||
def test_is_public_ip_false_for_invalid_value(self):
|
||||
self.assertFalse(is_public_ip("not-an-ip"))
|
||||
self.assertFalse(is_public_ip(""))
|
||||
self.assertFalse(is_public_ip(None))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user