<commit_before># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals

import frappe, unittest
import requests

from frappe.model.delete_doc import delete_doc
from frappe.utils.data import today, add_to_date
from frappe import _dict
from frappe.limits import update_limits, clear_limit
from frappe.utils import get_url
from frappe.core.doctype.user.user import get_total_users
from frappe.core.doctype.user.user import MaxUsersReachedError, test_password_strength

test_records = frappe.get_test_records('User')

class TestUser(unittest.TestCase):
	def test_user_type(self):
		new_user = frappe.get_doc(dict(doctype='User', email='<EMAIL>',
			first_name='Tester')).insert()
		self.assertEquals(new_user.user_type, 'Website User')
<commit_msg>[minor] disabled the password strength test in tearDown (#3259)<commit_after># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals

import frappe, unittest
import requests

from frappe.model.delete_doc import delete_doc
from frappe.utils.data import today, add_to_date
from frappe import _dict
from frappe.limits import update_limits, clear_limit
from frappe.utils import get_url
from frappe.core.doctype.user.user import get_total_users
from frappe.core.doctype.user.user import MaxUsersReachedError, test_password_strength

test_records = frappe.get_test_records('User')

class TestUser(unittest.TestCase):
	def tearDown(self):
		# disable password strength test
		frappe.db.set_value("System Settings", "System Settings", "enable_password_policy", 0)
		frappe.db.set_value("System Settings", "System Settings", "minimum_password_score", "")

	def test_user_type(self):
		new_user = frappe.get_doc(dict(doctype='User', email='<EMAIL>',
			first_name='Tester')).insert()
		self.assertEquals(new_user.user_type, 'Website User')

{'fraction_non_alphanumeric': 0.09320288362512873, 'fraction_numerical': 0.006694129763130793, 'mean_word_length': 6.7103174603174605, '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': '5815211', 'n_tokens_mistral': 639, 'n_tokens_neox': 622, 'n_words': 159}