Skip to content

Commit

Permalink
Add the test case
Browse files Browse the repository at this point in the history
  • Loading branch information
msuhanov committed Jul 17, 2016
1 parent 44af95d commit 90d3ae4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Binary file added tests/reg_samples/REORGANIZED_VALUES_TESTS
Binary file not shown.
25 changes: 25 additions & 0 deletions tests/test_reorganized_values.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import six
import unittest
from datetime import datetime

from Registry import Registry

class TestReorganizedValues(unittest.TestCase):
def setUp(self):
self.path = os.path.join(os.path.dirname(__file__), 'reg_samples', 'REORGANIZED_VALUES_TESTS')

def test_access_bits(self):
root = Registry.Registry(self.path).root()
for key in root.subkeys():
assert(key._nkrecord.access_bits() == 2)

def test_timestamp(self):
timestamp = Registry.Registry(self.path)._regf.reorganized_timestamp()
assert(timestamp == datetime(2016, 7, 17, 10, 40, 0, 41864))

# Run Tests
if __name__ == '__main__':
unittest.main(verbosity=2)

0 comments on commit 90d3ae4

Please sign in to comment.