Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/a/r/armstrong.base-HEAD/armstrong/base/tests/templatetags/text_helpers.py   armstrong.base(Download)
 
        node = text_helpers.HighlightedSearchTermNode("text")
        result = node.render(context)
        self.assertIsInstance(result, SafeData)
 
    def test_gracefully_returns_when_lacking_request_object(self):
        text = "This is some text"
        node = text_helpers.HighlightedSearchTermNode("text")
        result = node.render({"text": text})
                "", url_template="http://localhost/%s", match="")
        node = text_helpers.HighlightedSearchTermNode("text")
        result = node.render({"text": text})
        self.assertEqual(text, result)
 
 
        node = text_helpers.HighlightedSearchTermNode("text")
        result = node.render(context)
 
        expected = 'This is <span class="search_term">some</span> text'
 
        node = text_helpers.HighlightedSearchTermNode("text")
        result = node.render(context)
        expected = 'This is <span class="search_term">SOME</span> text'
        self.assertEqual(expected, result)