feat: update test records
This commit is contained in:
parent
2dc96252bd
commit
5df22dcdcc
4 changed files with 3 additions and 9 deletions
|
|
@ -26,8 +26,7 @@ class TestUserPermission(unittest.TestCase):
|
|||
user = create_user('test_user_perm1@example.com', 'Website Manager')
|
||||
for category in ['general', 'public']:
|
||||
if not frappe.db.exists('Blog Category', category):
|
||||
frappe.get_doc({'doctype': 'Blog Category',
|
||||
'category_name': category, 'title': category}).insert()
|
||||
frappe.get_doc({'doctype': 'Blog Category', 'title': category}).insert()
|
||||
|
||||
param = get_params(user, 'Blog Category', 'general', is_default=1)
|
||||
add_user_permissions(param)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ import frappe
|
|||
class TestBlogCategory(unittest.TestCase):
|
||||
def test_route(self):
|
||||
cat = frappe.new_doc("Blog Categroy", {
|
||||
"title": "_Yet Another Category",
|
||||
"category_name": "test-category-yet-another-category",
|
||||
"title": "Test Category Yet Another Category",
|
||||
})
|
||||
cat.insert()
|
||||
self.assertEqual(cat.route, 'blog/test-category-yet-another-category')
|
||||
|
|
|
|||
|
|
@ -1,18 +1,15 @@
|
|||
[
|
||||
{
|
||||
"category_name": "_Test Blog Category",
|
||||
"doctype": "Blog Category",
|
||||
"parent_website_route": "blog",
|
||||
"title": "_Test Blog Category"
|
||||
},
|
||||
{
|
||||
"category_name": "_Test Blog Category 1",
|
||||
"doctype": "Blog Category",
|
||||
"parent_website_route": "blog",
|
||||
"title": "_Test Blog Category 1"
|
||||
},
|
||||
{
|
||||
"category_name": "_Test Blog Category 2",
|
||||
"doctype": "Blog Category",
|
||||
"parent_website_route": "blog",
|
||||
"title": "_Test Blog Category 2"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ def make_test_blog():
|
|||
if not frappe.db.exists('Blog Category', 'Test Blog Category'):
|
||||
frappe.get_doc(dict(
|
||||
doctype = 'Blog Category',
|
||||
category_name = 'Test Blog Category',
|
||||
title='Test Blog Category')).insert()
|
||||
if not frappe.db.exists('Blogger', 'test-blogger'):
|
||||
frappe.get_doc(dict(
|
||||
|
|
@ -45,7 +44,7 @@ def make_test_blog():
|
|||
full_name='Test Blogger')).insert()
|
||||
test_blog = frappe.get_doc(dict(
|
||||
doctype = 'Blog Post',
|
||||
blog_category = 'Test Blog Category',
|
||||
blog_category = 'test-blog-category',
|
||||
blogger = 'test-blogger',
|
||||
title = random_string(20),
|
||||
route = random_string(20),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue