Пример #1
0
    def test_get_about_us_english_standard_text(self):
        from ask_cfpb.models import get_standard_text
        from v1.models.snippets import ReusableText

        snippet_title = REUSABLE_TEXT_TITLES["about_us"]["en"]
        test_snippet = ReusableText.objects.create(title=snippet_title)
        self.assertEqual(get_standard_text("en", "about_us"), test_snippet)
Пример #2
0
 def test_article_page_context(self):
     response = self.client.get(self.article_page.url)
     self.assertEqual(
         get_standard_text(self.article_page.language, "about_us"),
         response.context_data.get("about_us"),
     )