# Path: dtformats/errors.py
# class ParseError(Exception):
# 
# Path: dtformats/safari_cookies.py
# class BinaryCookiesFile(data_format.BinaryDataFile):
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('safari_cookies.yaml')
#   def __init__(self, debug=False, output_writer=None):
#   def _DebugPrintFileHeader(self, file_header):
#   def _DebugPrintRecordHeader(self, record_header):
#   def _ReadCString(self, page_data, string_offset):
#   def _ReadFileFooter(self, file_object):
#   def _ReadFileHeader(self, file_object):
#   def _ReadPage(self, file_object, file_offset, page_size):
#   def _ReadPages(self, file_object):
#   def _ReadRecord(self, page_data, record_offset):
#   def ReadFileObject(self, file_object):
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


import io
import os
import unittest
from dtformats import errors
from dtformats import safari_cookies
from tests import test_lib
        number_of_pages=1,
        signature=b'cook')

    test_file._DebugPrintFileHeader(file_header)

  def testDebugPrintRecordHeader(self):
    """Tests the _DebugPrintRecordHeader function."""
    output_writer = test_lib.TestOutputWriter()
    test_file = safari_cookies.BinaryCookiesFile(output_writer=output_writer)

    data_type_map = test_file._GetDataTypeMap('binarycookies_record_header')

    record_header = data_type_map.CreateStructureValues(
        creation_time=0,
        expiration_time=1,
        flags=2,
        name_offset=3,
        path_offset=4,
        size=5,
        unknown1=6,
        unknown2=7,
        unknown3=8,
        url_offset=9,
        value_offset=10)

    test_file._DebugPrintRecordHeader(record_header)

  def testReadCString(self):
    """Tests the _ReadCString function."""
    output_writer = test_lib.TestOutputWriter()

# Path: dtformats/errors.py
# class ParseError(Exception):
# 
# Path: dtformats/safari_cookies.py
# class BinaryCookiesFile(data_format.BinaryDataFile):
#   _FABRIC = data_format.BinaryDataFile.ReadDefinitionFile('safari_cookies.yaml')
#   def __init__(self, debug=False, output_writer=None):
#   def _DebugPrintFileHeader(self, file_header):
#   def _DebugPrintRecordHeader(self, record_header):
#   def _ReadCString(self, page_data, string_offset):
#   def _ReadFileFooter(self, file_object):
#   def _ReadFileHeader(self, file_object):
#   def _ReadPage(self, file_object, file_offset, page_size):
#   def _ReadPages(self, file_object):
#   def _ReadRecord(self, page_data, record_offset):
#   def ReadFileObject(self, file_object):
# 
# Path: tests/test_lib.py
# class BaseTestCase(unittest.TestCase):
# class TestOutputWriter(output_writers.OutputWriter):
#   _TEST_DATA_PATH = os.path.join(os.getcwd(), 'test_data')
#   def _GetTestFilePath(self, path_segments):
#   def _SkipIfPathNotExists(self, path):
#   def __init__(self):
#   def Close(self):
#   def Open(self):
#   def WriteText(self, text):


# Path: tests/safari_cookies.py
import io
import os
import unittest
from dtformats import errors
from dtformats import safari_cookies
from tests import test_lib

        number_of_pages=1,
        signature=b'cook')

    test_file._DebugPrintFileHeader(file_header)

  def testDebugPrintRecordHeader(self):
    """Tests the _DebugPrintRecordHeader function."""
    output_writer = test_lib.TestOutputWriter()
    test_file = safari_cookies.BinaryCookiesFile(output_writer=output_writer)

    data_type_map = test_file._GetDataTypeMap('binarycookies_record_header')

    record_header = data_type_map.CreateStructureValues(
        creation_time=0,
        expiration_time=1,
        flags=2,
        name_offset=3,
        path_offset=4,
        size=5,
        unknown1=6,
        unknown2=7,
        unknown3=8,
        url_offset=9,
        value_offset=10)

    test_file._DebugPrintRecordHeader(record_header)

  def testReadCString(self):
    """Tests the _ReadCString function."""
    output_writer = test_lib.TestOutputWriter()

    test_file = safari_cookies.BinaryCookiesFile(output_writer=output_writer)