Merge pull request #18683 from Mangesh-Khairnar/fix-translation-test

test: Translation in search
This commit is contained in:
Deepesh Garg 2019-08-09 15:29:33 +05:30 committed by GitHub
commit ca5fdeb9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ class TestSearch(unittest.TestCase):
#Search for the word "cond", part of the word "conduire" (Lead) in french. #Search for the word "cond", part of the word "conduire" (Lead) in french.
def test_contact_search_in_foreign_language(self): def test_contact_search_in_foreign_language(self):
frappe.local.lang = 'fr' frappe.local.lang = 'fr'
output = filter_dynamic_link_doctypes("DocType", "cond", "name", 0, 20, {'fieldtype': 'HTML', 'fieldname': 'contact_html'}) output = filter_dynamic_link_doctypes("DocType", "prospect", "name", 0, 20, {'fieldtype': 'HTML', 'fieldname': 'contact_html'})
result = [['found' for x in y if x=="Lead"] for y in output] result = [['found' for x in y if x=="Lead"] for y in output]
self.assertTrue(['found'] in result) self.assertTrue(['found'] in result)