def test_read_template(self, render_template, monkeypatch): # getting read-online books fails because solr is not defined. # Empty list should be returned when there is error. monkeypatch.setattr(home, 'random_ebooks', lambda: None) books = home.readonline_carousel() html = unicode(render_template("books/custom_carousel", books=books, title="Classic Books", url="/read", key="public_domain")) assert html.strip() == ""
def test_read_template(self, render_template): # getting read-online books fails because solr is not defined. # Empty list should be returned when there is error. books = home.readonline_carousel() html = unicode(render_template("books/custom_carousel", books=books, title="Classic Books", url="/read", key="public_domain")) assert html.strip() == ""
def test_read_template(self, render_template, monkeypatch): # getting read-online books fails because solr is not defined. # Empty list should be returned when there is error. monkeypatch.setattr(home, 'random_ebooks', lambda: None) books = home.readonline_carousel() html = six.text_type( render_template("books/custom_carousel", books=books, title="Classic Books", url="/read", key="public_domain")) assert html.strip() == ""