<commit_before>import factory

from nodeconductor.backup import models
from nodeconductor.cloud.tests.factories import FlavorFactory


class BackupScheduleFactory(factory.DjangoModelFactory):
    class Meta(object):
        model = models.BackupSchedule

    name = factory.Sequence(lambda n: 'BackupSchedule#%s' % n)
    backup_source = factory.SubFactory(FlavorFactory)
    retention_time = 10
    is_active = True
    maximal_number_of_backups = 3
    schedule = '*/5 * * * *'<commit_msg>backup factory<commit_after>import factory

from nodeconductor.backup import models
from nodeconductor.cloud.tests.factories import FlavorFactory


class BackupScheduleFactory(factory.DjangoModelFactory):
    class Meta(object):
        model = models.BackupSchedule

    name = factory.Sequence(lambda n: 'BackupSchedule#%s' % n)
    backup_source = factory.SubFactory(FlavorFactory)
    retention_time = 10
    is_active = True
    maximal_number_of_backups = 3
    schedule = '*/5 * * * *'


class BackupFactory(factory.DjangoModelFactory):
    class Meta(object):
        model = models.Backup

    schedule = factory.SubFactory(BackupScheduleFactory)
    backup_source = factory.LazyAttribute(lambda b: b.schedule.backup_source)
{'fraction_non_alphanumeric': 0.08496732026143791, 'fraction_numerical': 0.006535947712418301, 'mean_word_length': 4.37280701754386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1069002', 'n_tokens_mistral': 364, 'n_tokens_neox': 351, 'n_words': 75}