Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. import unittest
  2.  
  3. import fsstat_fat16
  4. import tsk_helper
  5.  
  6.  
  7. class TestFSStatFat16(unittest.TestCase):
  8. def testAdams(self):
  9. self.maxDiff = None
  10. with open('adams.dd.fsstat') as f:
  11. expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
  12. with open('adams.dd', 'rb') as f:
  13. actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f))
  14. self.assertEqual(expected, actual)
  15.  
  16. def testFragmented(self):
  17. self.maxDiff = None
  18. with open('fragmented.dd.fsstat') as f:
  19. expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
  20. with open('fragmented.dd', 'rb') as f:
  21. actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f))
  22. self.assertEqual(expected, actual)
  23.  
  24. def testSpiff(self):
  25. self.maxDiff = None
  26. with open('spiff.dd.fsstat') as f:
  27. expected = tsk_helper.strip_all(tsk_helper.get_fsstat_output(f))
  28. with open('spiff.dd', 'rb') as f:
  29. actual = tsk_helper.strip_all(fsstat_fat16.fsstat_fat16(f, offset=2))
  30. self.assertEqual(expected, actual)
  31.  
  32.  
  33. if __name__ == '__main__':
  34. unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement