test: Replace usage of render with get_response
This commit is contained in:
parent
14ca9ce1b7
commit
5c6d3e043c
@ -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"]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user