<commit_before>import factory
import django.contrib.auth.models
from . import models


class User(factory.DjangoModelFactory):
    FACTORY_FOR = django.contrib.auth.models.User

    first_name = 'John'
    last_name = 'Doe'
    # admin = False


class Client(factory.DjangoModelFactory):
    FACTORY_FOR = models.Client

    name = factory.Sequence(lambda n: 'client%d' % n)
    address = factory.Sequence(lambda n: '%d rue de la paix' % n)


class InvoiceItem(factory.DjangoModelFactory):
    FACTORY_FOR = models.InvoiceItem

    description = factory.Sequence(lambda n: 'Item #%d' % n)
    quantity = 2
    vat = 20.0
    amount = 100.0


class Invoice(factory.DjangoModelFactory):
    FACTORY_FOR = models.Invoice

    name = factory.Sequence(lambda n: 'Invoice #%d' % n)
    client = factory.SubFactory(Client)<commit_msg>Added username to the User factory.<commit_after>import factory
import django.contrib.auth.models
from . import models


class User(factory.DjangoModelFactory):
    FACTORY_FOR = django.contrib.auth.models.User

    username = factory.Sequence(lambda n: 'user%d' % n)
    first_name = 'John'
    last_name = 'Doe'
    # admin = False


class Client(factory.DjangoModelFactory):
    FACTORY_FOR = models.Client

    name = factory.Sequence(lambda n: 'client%d' % n)
    address = factory.Sequence(lambda n: '%d rue de la paix' % n)


class InvoiceItem(factory.DjangoModelFactory):
    FACTORY_FOR = models.InvoiceItem

    description = factory.Sequence(lambda n: 'Item #%d' % n)
    quantity = 2
    vat = 20.0
    amount = 100.0


class Invoice(factory.DjangoModelFactory):
    FACTORY_FOR = models.Invoice

    name = factory.Sequence(lambda n: 'Invoice #%d' % n)
    client = factory.SubFactory(Client)
{'fraction_non_alphanumeric': 0.10854503464203233, 'fraction_numerical': 0.009237875288683603, 'mean_word_length': 3.6461126005361932, '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': '229115', 'n_tokens_mistral': 585, 'n_tokens_neox': 549, 'n_words': 135}