Merge branch 'master' into staging-fixes
This commit is contained in:
commit
395972bf0b
5 changed files with 11 additions and 5 deletions
|
|
@ -17,7 +17,7 @@ from faker import Faker
|
|||
from .exceptions import *
|
||||
from .utils.jinja import (get_jenv, get_template, render_template, get_email_from_template, get_jloader)
|
||||
|
||||
__version__ = '10.1.67'
|
||||
__version__ = '10.1.68'
|
||||
__title__ = "Frappe Framework"
|
||||
|
||||
local = Local()
|
||||
|
|
|
|||
|
|
@ -61,9 +61,8 @@ class TestReport(unittest.TestCase):
|
|||
with open(os.path.join(os.path.dirname(__file__), 'user_activity_report_without_sort.json'), 'r') as f:
|
||||
frappe.get_doc(json.loads(f.read())).insert()
|
||||
|
||||
report = frappe.get_doc('Report', 'User Activity Report Without Sort')
|
||||
# this would raise an error without the fix added along with this test case
|
||||
columns, data = report.get_data()
|
||||
|
||||
self.assertEqual(columns[0].get('label'), 'ID')
|
||||
self.assertEqual(columns[1].get('label'), 'User Type')
|
||||
self.assertTrue('Administrator' in [d[0] for d in data])
|
||||
|
|
|
|||
|
|
@ -276,6 +276,13 @@ class TestUser(unittest.TestCase):
|
|||
self.assertEqual(extract_mentions(user_name)[0], "test-user")
|
||||
user_name = "Testing comment, @test.user@example.com please check."
|
||||
self.assertEqual(extract_mentions(user_name)[0], "test.user@example.com")
|
||||
user_name = "<div>@test_user@example.com and @test.again@example1.com</div><div>This is a test.</div>"
|
||||
self.assertEqual(extract_mentions(user_name)[0], "test_user@example.com")
|
||||
self.assertEqual(extract_mentions(user_name)[1], "test.again@example1.com")
|
||||
user_name = "<div>@user@example.com</a> Test @test-comment@xyz.com</div><div>Test for comment mentions @test@abc.com</div>"
|
||||
self.assertEqual(extract_mentions(user_name)[0], "user@example.com")
|
||||
self.assertEqual(extract_mentions(user_name)[1], "test-comment@xyz.com")
|
||||
self.assertEqual(extract_mentions(user_name)[2], "test@abc.com")
|
||||
|
||||
def delete_contact(user):
|
||||
frappe.db.sql("delete from tabContact where email_id='%s'" % frappe.db.escape(user))
|
||||
|
|
|
|||
|
|
@ -922,7 +922,7 @@ def notify_admin_access_to_system_manager(login_manager=None):
|
|||
def extract_mentions(txt):
|
||||
"""Find all instances of @name in the string.
|
||||
The mentions will be separated by non-word characters or may appear at the start of the string"""
|
||||
txt = txt.replace("<br>", "<br> ")
|
||||
txt = txt.replace("<div>", "<div> ")
|
||||
txt = re.sub(r'(<[a-zA-Z\/][^>]*>)', '', txt)
|
||||
return re.findall(r'(?:[^\w\.\-\@]|^)@([\w\.\-\@]*)', txt)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"space": 0.157,
|
||||
"expiry": "2016-07-25",
|
||||
"users": 1
|
||||
}
|
||||
},
|
||||
|
||||
"developer_mode": 1,
|
||||
"auto_cache_clear": true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue