27 lines
869 B
Python
27 lines
869 B
Python
import unittest
|
|
|
|
from resolve_route import parse_code_map
|
|
|
|
|
|
class ParseCodeMapTests(unittest.TestCase):
|
|
def test_resolves_requested_identifiers_and_strips_comments(self):
|
|
text = """
|
|
REPO-001-WEB=https://example.invalid/fifth-domain
|
|
ICE-GL-ZY001=eternal-lake-heart/heartbeat-core/zhuyuan-persona-system/INDEX.hdlp # current
|
|
LL-004=tcs-core/LL-004-LAKE-LAMP-WAKE-PATH.hdlp
|
|
"""
|
|
|
|
self.assertEqual(
|
|
parse_code_map(text, ("ICE-GL-ZY001", "LL-004")),
|
|
{
|
|
"ICE-GL-ZY001": "eternal-lake-heart/heartbeat-core/zhuyuan-persona-system/INDEX.hdlp",
|
|
"LL-004": "tcs-core/LL-004-LAKE-LAMP-WAKE-PATH.hdlp",
|
|
},
|
|
)
|
|
|
|
def test_ignores_unrequested_identifiers(self):
|
|
self.assertEqual(parse_code_map("OTHER=some/path", ("LL-004",)), {})
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|