-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
msuhanov
committed
Jul 17, 2016
1 parent
44af95d
commit 90d3ae4
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |