Add `babeltrace.` prefix to `trace-info` and `support-info` query objects
[babeltrace.git] / tests / data / cli / auto-source-discovery / bt_plugin_test.py
index 002e9c33e3474c82a41c7251f9ff1431069a6f26..a4177240ed03b674fe32afd39dc893cd3b3a000a 100644 (file)
@@ -27,7 +27,7 @@ class TestSourceExt(Base, bt2._UserSourceComponent, message_iterator_class=TestI
 
     @staticmethod
     def _user_query(query_exec, obj, params, log_level):
-        if obj == 'support-info':
+        if obj == 'babeltrace.support-info':
             if params['type'] == 'file':
                 name = os.path.basename(str(params['input']))
 
@@ -49,7 +49,7 @@ class TestSourceExt(Base, bt2._UserSourceComponent, message_iterator_class=TestI
             else:
                 return 0
         else:
-            raise bt2.InvalidObject
+            raise bt2.UnknownObject
 
 
 @bt2.plugin_component_class
@@ -65,14 +65,14 @@ class TestSourceSomeDir(
 
     @staticmethod
     def _user_query(query_exec, obj, params, log_level):
-        if obj == 'support-info':
+        if obj == 'babeltrace.support-info':
             if params['type'] == 'directory':
                 name = os.path.basename(str(params['input']))
                 return 1 if name == 'some-dir' else 0
             else:
                 return 0
         else:
-            raise bt2.InvalidObject
+            raise bt2.UnknownObject
 
 
 @bt2.plugin_component_class
@@ -84,14 +84,14 @@ class TestSourceABCDE(Base, bt2._UserSourceComponent, message_iterator_class=Tes
 
     @staticmethod
     def _user_query(query_exec, obj, params, log_level):
-        if obj == 'support-info':
+        if obj == 'babeltrace.support-info':
             return (
                 1.0
                 if params['type'] == 'string' and params['input'] == 'ABCDE'
                 else 0.0
             )
         else:
-            raise bt2.InvalidObject
+            raise bt2.UnknownObject
 
 
 class TestSourceNoQuery(bt2._UserSourceComponent, message_iterator_class=TestIter):
This page took 0.025295 seconds and 4 git commands to generate.