# 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
      0x00, 0x00, 0x00, 0xed, 0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0xa3,
      0x00, 0x00, 0x00, 0x76]))

  _FILE_HEADER_DATA_BAD_SIGNATURE = bytes(bytearray([
      0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x76,
      0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x31,
      0x00, 0x00, 0x00, 0xcd, 0x00, 0x00, 0x06, 0xc9, 0x00, 0x00, 0x02, 0x34,
      0x00, 0x00, 0x01, 0x2c, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x03, 0x3d,
      0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x03, 0x58,
      0x00, 0x00, 0x02, 0x4e, 0x00, 0x00, 0x02, 0x88, 0x00, 0x00, 0x05, 0x6e,
      0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0xd3,
      0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x01, 0x8d, 0x00, 0x00, 0x00, 0xf4,
      0x00, 0x00, 0x01, 0x95, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x77,
      0x00, 0x00, 0x00, 0xed, 0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0xa3,
      0x00, 0x00, 0x00, 0x76]))

  _PAGE_DATA = bytes(bytearray([
      0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
      0x6a, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x77, 0xe5, 0x94, 0xce, 0x41,
      0x00, 0x00, 0x00, 0x70, 0x2d, 0x8b, 0xb7, 0x41, 0x53, 0x57, 0x49, 0x44,
      0x00, 0x43, 0x42, 0x45, 0x43, 0x37, 0x46, 0x30, 0x42, 0x2d, 0x43, 0x36,
      0x34, 0x45, 0x2d, 0x34, 0x32, 0x39, 0x30, 0x2d, 0x38, 0x37, 0x33, 0x45,
      0x2d, 0x31, 0x42, 0x31, 0x38, 0x33, 0x30, 0x33, 0x31, 0x33, 0x39, 0x35,
      0x44, 0x00, 0x2e, 0x67, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x00, 0x2f, 0x00]))

  def testDebugPrintFileHeader(self):
    """Tests the _DebugPrintFileHeader 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

      0x00, 0x00, 0x00, 0xed, 0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0xa3,
      0x00, 0x00, 0x00, 0x76]))

  _FILE_HEADER_DATA_BAD_SIGNATURE = bytes(bytearray([
      0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x76,
      0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x31,
      0x00, 0x00, 0x00, 0xcd, 0x00, 0x00, 0x06, 0xc9, 0x00, 0x00, 0x02, 0x34,
      0x00, 0x00, 0x01, 0x2c, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x03, 0x3d,
      0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x03, 0x58,
      0x00, 0x00, 0x02, 0x4e, 0x00, 0x00, 0x02, 0x88, 0x00, 0x00, 0x05, 0x6e,
      0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0xd3,
      0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x01, 0x8d, 0x00, 0x00, 0x00, 0xf4,
      0x00, 0x00, 0x01, 0x95, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x77,
      0x00, 0x00, 0x00, 0xed, 0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0xa3,
      0x00, 0x00, 0x00, 0x76]))

  _PAGE_DATA = bytes(bytearray([
      0x6c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
      0x6a, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x77, 0xe5, 0x94, 0xce, 0x41,
      0x00, 0x00, 0x00, 0x70, 0x2d, 0x8b, 0xb7, 0x41, 0x53, 0x57, 0x49, 0x44,
      0x00, 0x43, 0x42, 0x45, 0x43, 0x37, 0x46, 0x30, 0x42, 0x2d, 0x43, 0x36,
      0x34, 0x45, 0x2d, 0x34, 0x32, 0x39, 0x30, 0x2d, 0x38, 0x37, 0x33, 0x45,
      0x2d, 0x31, 0x42, 0x31, 0x38, 0x33, 0x30, 0x33, 0x31, 0x33, 0x39, 0x35,
      0x44, 0x00, 0x2e, 0x67, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x00, 0x2f, 0x00]))

  def testDebugPrintFileHeader(self):
    """Tests the _DebugPrintFileHeader function."""
    output_writer = test_lib.TestOutputWriter()

    test_file = safari_cookies.BinaryCookiesFile(output_writer=output_writer)