1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the key path functions."""
from __future__ import unicode_literals
import unittest
from dfwinreg import key_paths
from tests import test_lib
class KeyPathTest(test_lib.BaseTestCase):
"""Tests for the key path functions."""
# TODO: add tests for JoinKeyPath
def testSplitKeyPath(self):
"""Tests the SplitKeyPath function."""
expected_path_segments = ['HKEY_CURRENT_USER', 'Software', 'Microsoft']
path_segments = key_paths.SplitKeyPath(
'HKEY_CURRENT_USER\\Software\\Microsoft', '\\')
self.assertEqual(path_segments, expected_path_segments)
# TODO: improve test coverage.
if __name__ == '__main__':
unittest.main()
|