Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import unittest
- import fsstat_fat16
- import tsk_helper
- class TestFSStatFat16(unittest.TestCase):
- def testAdams(self):
- self.maxDiff = None
- with open('adams.dd.fsstat') as f:
- expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
- with open('adams.dd', 'rb') as f:
- actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f))
- self.assertEqual(expected, actual)
- def testFragmented(self):
- self.maxDiff = None
- with open('fragmented.dd.fsstat') as f:
- expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
- with open('fragmented.dd', 'rb') as f:
- actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f))
- self.assertEqual(expected, actual)
- def testSpiff(self):
- self.maxDiff = None
- with open('spiff.dd.fsstat') as f:
- expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
- with open('spiff.dd', 'rb') as f:
- actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f, offset=2))
- self.assertEqual(expected, actual)
- if __name__ == '__main__':
- unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement