예제 #1
0
 def test_nested_qualified_key(self):
     tested = device.PropertyAccessor(None, None, None)
     self.assertEqual(
         [
             ('org.freedesktop.UDisks2.Block', 'Drive'),
             ('org.freedesktop.UDisks2.Drive', 'Media'),
         ],
         tested.parse_key(
             'org.freedesktop.UDisks2.Block.Drive/org.freedesktop.UDisks2.Drive.Media'
         ))
예제 #2
0
 def test_empty_key(self):
     tested = device.PropertyAccessor(None, None, None)
     self.assertEqual([], tested.parse_key(''))
예제 #3
0
 def test_simple_qualified_key(self):
     tested = device.PropertyAccessor(None, None, None)
     self.assertEqual(
         [('org.freedesktop.UDisks2.Block', 'IdLabel')],
         tested.parse_key('org.freedesktop.UDisks2.Block.IdLabel'))
예제 #4
0
 def test_nested_unqualified_key(self):
     tested = device.PropertyAccessor(None, None, None)
     self.assertEqual([
         (None, 'Drive'),
         (None, 'Media'),
     ], tested.parse_key('Drive/Media'))
예제 #5
0
 def test_simple_unqualified_key(self):
     tested = device.PropertyAccessor(None, None, None)
     self.assertEqual([(None, 'IdLabel')], tested.parse_key('IdLabel'))