<commit_before>from context import slot_users_controller as uc


class TestUsers:

    def test_validate_credentials_returns_true_for_valid_credentials(self):
        result = uc.return_user_if_valid_credentials('slot', 'test')
        assert result is True

    def test_validate_credentials_returns_false_for_invalid_credentials(self):
        result = uc.return_user_if_valid_credentials('bad_username', '<PASSWORD>')
        assert result is False

    def test_convert_dict_to_user_instance_returns_valid_user_instance(self):
        result = uc.convert_dict_to_user_instance({})
        assert result<commit_msg>Update test to reflect new method name.<commit_after>from context import slot_users_controller as uc


class TestUsers:

    def test_validate_credentials_returns_true_for_valid_credentials(self):
        result = uc.return_user_if_valid_credentials('slot', 'test')
        assert result is True

    def test_validate_credentials_returns_false_for_invalid_credentials(self):
        result = uc.return_user_if_valid_credentials('bad_username', '<PASSWORD>')
        assert result is False

    def test_convert_dict_to_user_instance_returns_valid_user_instance(self):
        result = uc.return_user_instance_or_anonymous({})
        assert result
{'fraction_non_alphanumeric': 0.06240126382306477, 'fraction_numerical': 0.0, 'mean_word_length': 4.976415094339623, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7349591', 'n_tokens_mistral': 376, 'n_tokens_neox': 359, 'n_words': 69}