Example #1
0
 def test_set_value_unicode_value(self):
     '''
     Test the set_value function on a unicode value
     '''
     try:
         self.assertTrue(
             win_reg.set_value(hive='HKLM',
                               key=FAKE_KEY,
                               vname='fake_unicode',
                               vdata=UNICODE_VALUE))
         expected = {
             'hive': 'HKLM',
             'key': FAKE_KEY,
             'success': True,
             'vdata': UNICODE_VALUE,
             'vname': 'fake_unicode',
             'vtype': 'REG_SZ'
         }
         self.assertEqual(
             win_reg.read_value(hive='HKLM',
                                key=FAKE_KEY,
                                vname='fake_unicode'), expected)
     finally:
         win_reg.delete_key_recursive(hive='HKLM', key=FAKE_KEY)
Example #2
0
 def setUp(self):
     self.assertTrue(
         win_reg.set_value(
             hive="HKLM", key=FAKE_KEY, vname="fake_name", vdata="fake_data"
         )
     )
Example #3
0
 def setUp(self):
     self.assertTrue(
         win_reg.set_value(hive='HKLM',
                           key=FAKE_KEY,
                           vname='fake_name',
                           vdata='fake_data'))