# Path: django_test_tools/exceptions.py
# class DjangoTestToolsException(Exception):
#     pass


import hashlib
import json
import os
import pickle
import shutil
from datetime import date, datetime
from django.conf import settings
from django.utils import timezone
from django_test_tools.exceptions import DjangoTestToolsException
            else:
                file.writelines(str(content))
        return os.path.join(self.new_path, filename)


def compare_file_content(*args, **kwargs):
    errors = list()
    file1 = args[0]
    file2 = args[1]
    excluded_lines = kwargs.get('excluded_lines', [])
    encoding = kwargs.get('encoding', 'utf-8')
    raise_exception = kwargs.get('raise_exception', True)
    eol = kwargs.get('eol', '\n')

    def get_lines(filename):
        with open(filename, 'r', encoding=encoding, newline=eol) as file:
            lines = file.readlines()
        return lines

    lines1 = get_lines(file1)
    lines2 = get_lines(file2)

    for i in range(len(lines1)):
        if i not in excluded_lines:
            if lines1[i] != lines2[i]:
                msg = 'On line {} expected "{}" got "{}"'.format(i,
                                                                 lines1[i].replace(eol, ''),
                                                                 lines2[i].replace(eol, ''))
                errors.append(msg)
                if raise_exception:

# Path: django_test_tools/exceptions.py
# class DjangoTestToolsException(Exception):
#     pass


# Path: django_test_tools/file_utils.py
import hashlib
import json
import os
import pickle
import shutil
from datetime import date, datetime
from django.conf import settings
from django.utils import timezone
from django_test_tools.exceptions import DjangoTestToolsException

            else:
                file.writelines(str(content))
        return os.path.join(self.new_path, filename)


def compare_file_content(*args, **kwargs):
    errors = list()
    file1 = args[0]
    file2 = args[1]
    excluded_lines = kwargs.get('excluded_lines', [])
    encoding = kwargs.get('encoding', 'utf-8')
    raise_exception = kwargs.get('raise_exception', True)
    eol = kwargs.get('eol', '\n')

    def get_lines(filename):
        with open(filename, 'r', encoding=encoding, newline=eol) as file:
            lines = file.readlines()
        return lines

    lines1 = get_lines(file1)
    lines2 = get_lines(file2)

    for i in range(len(lines1)):
        if i not in excluded_lines:
            if lines1[i] != lines2[i]:
                msg = 'On line {} expected "{}" got "{}"'.format(i,
                                                                 lines1[i].replace(eol, ''),
                                                                 lines2[i].replace(eol, ''))
                errors.append(msg)
                if raise_exception:

                    raise DjangoTestToolsException(msg)