<commit_before>from django.core.exceptions import ValidationError

import pytest
from nose.tools import eq_, ok_

from shmitter.users.models import User
from .. import factories as f

pytestmark = pytest.mark.django_db


@pytest.fixture
def user_data():
    return {
        'username': 'harrypotter',
        'email': '<EMAIL>',
        'full_name': '<NAME>',
        'password': '<PASSWORD>'
    }


@pytest.fixture(scope='module')
def user_obj():
    return f.UserFactory.build()


class TestUserModel:

    def test__str__(self, user_obj, mocker):
        mock_get_short_name = mocker.patch.object(user_obj, 'get_short_name')
        user_obj.__str__()
        mock_get_short_name.assert_called_once()
<commit_msg>Fix assert_called_once AttributeError<commit_after>from django.core.exceptions import ValidationError

import pytest
from nose.tools import eq_, ok_

from shmitter.users.models import User
from .. import factories as f

pytestmark = pytest.mark.django_db


@pytest.fixture
def user_data():
    return {
        'username': 'harrypotter',
        'email': '<EMAIL>',
        'full_name': '<NAME>',
        'password': '<PASSWORD>'
    }


@pytest.fixture(scope='module')
def user_obj():
    return f.UserFactory.build()


class TestUserModel:

    def test__str__(self, user_obj, mocker):
        mock_get_short_name = mocker.patch.object(user_obj, 'get_short_name')
        user_obj.__str__()
        mock_get_short_name.assert_called_once_with()

{'fraction_non_alphanumeric': 0.11467576791808874, 'fraction_numerical': 0.0, 'mean_word_length': 3.7138263665594855, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3726556', 'n_tokens_mistral': 486, 'n_tokens_neox': 485, 'n_words': 102}