Configure generic Verizon endpoints

This commit is contained in:
Lyncoln
2026-09-19 18:35:45 -04:00
parent 23dbd3cf91
commit 694191b1d7
2 changed files with 51 additions and 0 deletions
+43
View File
@@ -115,6 +115,49 @@ class AppConfigEndpointTests(unittest.TestCase):
):
AppConfig.from_env()
def test_verizon_endpoint_list_is_plugin_specific(self):
with patch.dict(
os.environ,
{
"NPM_ENDPOINTS": "192.168.1.3",
"VERIZON_ENDPOINTS": (
"192.168.1.1,192.168.1.254:8443"
),
},
clear=True,
):
config = AppConfig.from_env()
self.assertEqual(
tuple(
endpoint.identity
for endpoint in config.verizon_endpoints
),
(
"verizon://192.168.1.1:443",
"verizon://192.168.1.254:8443",
),
)
def test_router_url_does_not_configure_generic_endpoint(self):
with patch.dict(
os.environ,
{
"NPM_ENDPOINTS": "192.168.1.3",
"ROUTER_URL": "https://192.168.1.254",
},
clear=True,
):
config = AppConfig.from_env()
self.assertEqual(
tuple(
endpoint.identity
for endpoint in config.verizon_endpoints
),
("verizon://192.168.1.1:443",),
)
if __name__ == "__main__":
unittest.main()