Merge pull request #26088 from surajshetty3416/refactor-website-routing
This commit is contained in:
commit
6894cc2832
1
.github/helper/install.sh
vendored
1
.github/helper/install.sh
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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"]
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
import frappe.website.render
|
||||
|
||||
page_title = "Partners"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user