1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the VFS data stream interface."""
import unittest
from dfvfs.vfs import data_stream
from tests import test_lib as shared_test_lib
class DataStreamTest(shared_test_lib.BaseTestCase):
"""Tests the VFS data stream interface."""
def testName(self):
"""Test the name property."""
test_data_stream = data_stream.DataStream(None)
self.assertEqual(test_data_stream.name, '')
def testGetExtents(self):
"""Test the GetExtents function."""
test_data_stream = data_stream.DataStream(None)
extents = test_data_stream.GetExtents()
self.assertEqual(extents, [])
def testIsDefault(self):
"""Test the IsDefault function."""
test_data_stream = data_stream.DataStream(None)
result = test_data_stream.IsDefault()
self.assertTrue(result)
if __name__ == '__main__':
unittest.main()
|