diff --git a/test/test_opsdb_queries.py b/test/test_opsdb_queries.py
index daba68fdad1b0dde7475ddd6940334ac76654e74..e3d0bc56176fa30551bab6011459ad9b19cf497e 100644
--- a/test/test_opsdb_queries.py
+++ b/test/test_opsdb_queries.py
@@ -1,5 +1,6 @@
 import json
 import os
+import re
 
 import jsonschema
 import pytest
@@ -246,8 +247,9 @@ def test_get_all_service_users(connection, cached_test_data):
         for k in cached_test_data.keys():
             if not k.startswith('netconf-interfaces:'):
                 continue
-            (_, hostname, ifc_name) = k.split(':')
-            yield {'hostname': hostname, 'interface': ifc_name}
+            m = re.match(r'^netconf-interfaces:([^:]+):(.*)$', k)
+            assert m
+            yield {'hostname': m.group(1), 'interface': m.group(2)}
 
     def _all_service_ids(interfaces):
         for ifc in interfaces: