<commit_before>import pytest

from django.contrib.auth import get_user_model

from .factories import UserFactory

pytestmark = pytest.mark.django_db


def test_get_short_name_should_return_short_name():
    user = UserFactory()
    assert user.get_short_name() == "Sankara"


def test_get_full_name_should_return_full_name():
    user = UserFactory()
    assert user.get_full_name() == "<NAME>"


def test_create_user():
    model = get_user_model()
    user = model.objects.create_user('123456')
    assert user.pk is not None
    assert user.serial == '123456'


def test_create_superuser():
    model = get_user_model()
    user = model.objects.create_superuser('123456', '<PASSWORD>')
    assert user.pk is not None
    assert user.serial == '123456'<commit_msg>Do not save UserFactory when not needed<commit_after>import pytest

from django.contrib.auth import get_user_model

from .factories import UserFactory

pytestmark = pytest.mark.django_db


def test_get_short_name_should_return_short_name():
    user = UserFactory.build()
    assert user.get_short_name() == "Sankara"


def test_get_full_name_should_return_full_name():
    user = UserFactory.build()
    assert user.get_full_name() == "<NAME>"


def test_create_user():
    model = get_user_model()
    user = model.objects.create_user('123456')
    assert user.pk is not None
    assert user.serial == '123456'


def test_create_superuser():
    model = get_user_model()
    user = model.objects.create_superuser('123456', '<PASSWORD>')
    assert user.pk is not None
    assert user.serial == '123456'
{'fraction_non_alphanumeric': 0.10318471337579618, 'fraction_numerical': 0.030573248407643312, 'mean_word_length': 4.473867595818815, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1528497', 'n_tokens_mistral': 546, 'n_tokens_neox': 511, 'n_words': 115}