コード例 #1
0
    def test_get_data_sub_file(self):
        # Arrange
        data = copy(init_data)
        fs = FileSystem(data)

        # Act
        result = fs.get_data('/dir1/dir2/filename2')

        # Assert
        self.assertEqual(result, data['dir1']['dir2']['filename2'])
コード例 #2
0
    def test_get_data_simple_existing_root(self):
        # Arrange
        data = copy(init_data)
        fs = FileSystem(data)

        # Act
        result = fs.get_data('/filename1')

        # Assert
        self.assertEqual(result, data['filename1'])