# Path: core/models.py
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def validate_cron(value):
#     def __init__(self, *args, **kwargs):
#     def formfield(self, **kwargs):
#     def validate(self, value, model_instance):
#     def get_actual_hosts(self) -> models.QuerySet:
#     def get_playbook_name(self) -> str:
#     def get_hosts_without_groups(self) -> models.QuerySet:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def get_vars(self):
#     def __str__(self):
#     def __str__(self):
#     def create_task(self, user, is_automatically_created=False, repeat_number=0):
#     def have_uncompleted_task(self):
#     def __str__(self):
#     def get_ansible_command(self):
#     def get_duration(self) -> datetime.timedelta:
#     def stop(self):
#     def __str__(self):
# class CronField(models.CharField):
# class TaskOperationsMixin:
# class Variable(models.Model):
#     class Meta:
# class HostGroup(models.Model):
#     class Meta:
# class Host(models.Model):
#     class Meta:
# class AnsibleUser(models.Model):
#     class Meta:
# class TaskTemplate(TaskOperationsMixin, models.Model):
#     class Meta:
# class RepeatSetting(models.Model):
# class Task(TaskOperationsMixin, models.Model):
#     class Meta:
# class TaskLog(models.Model):
#     class Meta:


import factory
from django.contrib.auth.models import User
from django.contrib.auth import settings
from core import models
        host_groups=(group_without_test,)
    )
    TaskFactory.create(hosts=(host_with_test,), host_groups=(group_with_test,),
                       template=tsk_tmlt_wth_tst, playbook='/tmp/ansible/test.yml')
    TaskFactory.create(
        hosts=(host_without_test,),
        host_groups=(group_without_test,),
        template=tsk_tmlt_wthout_tst,
        playbook=settings.ANSIBLE_PLAYBOOKS_PATH + '/test.yml',
        status='fail'
    )


def create_data_for_search_host():
    host_user = User.objects.create(
        username='Test user'
    )
    host_group = models.HostGroup.objects.create(
        name='Test group'
    )
    host = models.Host.objects.create(
        name='test name',
        address='192.168.19.19',
    )
    host.users.add(host_user)
    host.groups.add(host_group)
    models.Host.objects.create(
        name='Other test name',
        address='192.168.32.44',
    )

# Path: core/models.py
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def validate_cron(value):
#     def __init__(self, *args, **kwargs):
#     def formfield(self, **kwargs):
#     def validate(self, value, model_instance):
#     def get_actual_hosts(self) -> models.QuerySet:
#     def get_playbook_name(self) -> str:
#     def get_hosts_without_groups(self) -> models.QuerySet:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def get_vars(self):
#     def __str__(self):
#     def __str__(self):
#     def create_task(self, user, is_automatically_created=False, repeat_number=0):
#     def have_uncompleted_task(self):
#     def __str__(self):
#     def get_ansible_command(self):
#     def get_duration(self) -> datetime.timedelta:
#     def stop(self):
#     def __str__(self):
# class CronField(models.CharField):
# class TaskOperationsMixin:
# class Variable(models.Model):
#     class Meta:
# class HostGroup(models.Model):
#     class Meta:
# class Host(models.Model):
#     class Meta:
# class AnsibleUser(models.Model):
#     class Meta:
# class TaskTemplate(TaskOperationsMixin, models.Model):
#     class Meta:
# class RepeatSetting(models.Model):
# class Task(TaskOperationsMixin, models.Model):
#     class Meta:
# class TaskLog(models.Model):
#     class Meta:


# Path: core/tests/factories.py
import factory
from django.contrib.auth.models import User
from django.contrib.auth import settings
from core import models

        host_groups=(group_without_test,)
    )
    TaskFactory.create(hosts=(host_with_test,), host_groups=(group_with_test,),
                       template=tsk_tmlt_wth_tst, playbook='/tmp/ansible/test.yml')
    TaskFactory.create(
        hosts=(host_without_test,),
        host_groups=(group_without_test,),
        template=tsk_tmlt_wthout_tst,
        playbook=settings.ANSIBLE_PLAYBOOKS_PATH + '/test.yml',
        status='fail'
    )


def create_data_for_search_host():
    host_user = User.objects.create(
        username='Test user'
    )
    host_group = models.HostGroup.objects.create(
        name='Test group'
    )
    host = models.Host.objects.create(
        name='test name',
        address='192.168.19.19',
    )
    host.users.add(host_user)
    host.groups.add(host_group)
    models.Host.objects.create(
        name='Other test name',
        address='192.168.32.44',
    )

    host = models.Host.objects.create(