Merge pull request #26088 from surajshetty3416/refactor-website-routing

This commit is contained in:
Suraj Shetty 2021-06-17 20:43:23 +05:30 committed by GitHub
commit 6894cc2832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 11 deletions

View File

@ -44,3 +44,4 @@ sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile
bench get-app erpnext "${GITHUB_WORKSPACE}"
bench start &
bench --site test_site reinstall --yes
bench build --app frappe

View File

@ -6,12 +6,12 @@ from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import set_request
from frappe.website.render import render
from frappe.website.serve import get_response
class TestHomepage(unittest.TestCase):
def test_homepage_load(self):
set_request(method='GET', path='home')
response = render()
response = get_response()
self.assertEqual(response.status_code, 200)

View File

@ -7,7 +7,7 @@ import frappe
import unittest
from bs4 import BeautifulSoup
from frappe.utils import set_request
from frappe.website.render import render
from frappe.website.serve import get_response
class TestHomepageSection(unittest.TestCase):
def test_homepage_section_card(self):
@ -26,7 +26,7 @@ class TestHomepageSection(unittest.TestCase):
pass
set_request(method='GET', path='home')
response = render()
response = get_response()
self.assertEqual(response.status_code, 200)
@ -59,7 +59,7 @@ class TestHomepageSection(unittest.TestCase):
}).insert()
set_request(method='GET', path='home')
response = render()
response = get_response()
self.assertEqual(response.status_code, 200)

View File

@ -2,10 +2,8 @@ from __future__ import unicode_literals
from bs4 import BeautifulSoup
import frappe, unittest
from frappe.utils import set_request, get_html_for_route
from frappe.website.render import render
from frappe.utils import get_html_for_route
from erpnext.portal.product_configurator.utils import get_products_for_website
from erpnext.stock.doctype.item.test_item import make_item_variant
test_dependencies = ["Item"]

View File

@ -8,7 +8,7 @@ from frappe import _
from frappe.utils import nowdate, cint, cstr
from frappe.utils.nestedset import NestedSet
from frappe.website.website_generator import WebsiteGenerator
from frappe.website.render import clear_cache
from frappe.website.utils import clear_cache
from frappe.website.doctype.website_slideshow.website_slideshow import get_slideshow
from erpnext.shopping_cart.product_info import set_product_info_for_website
from erpnext.utilities.product import get_qty_in_stock

View File

@ -16,7 +16,7 @@ from frappe.utils.html_utils import clean_html
from frappe.website.doctype.website_slideshow.website_slideshow import \
get_slideshow
from frappe.website.render import clear_cache
from frappe.website.utils import clear_cache
from frappe.website.website_generator import WebsiteGenerator

View File

@ -3,7 +3,6 @@
from __future__ import unicode_literals
import frappe
import frappe.website.render
page_title = "Partners"