# -*- coding: utf-8 -*-
import mock

from django.conf import settings
from django.core import mail
from django.core.management import call_command

from olympia import amo
from olympia.activity.models import ActivityLog
from olympia.addons.models import AddonApprovalsCounter
from olympia.amo.tests import (
    addon_factory, file_factory, TestCase, user_factory, version_factory)
from olympia.files.models import FileValidation
from olympia.files.utils import atomic_lock
from olympia.reviewers.management.commands import auto_approve
from olympia.reviewers.models import (
    AutoApprovalNotEnoughFilesError, AutoApprovalNoValidationResultError,
    AutoApprovalSummary, get_reviewing_cache, ReviewerScore)


class TestAutoApproveCommand(TestCase):
    def setUp(self):
        self.user = user_factory(