Ejemplo n.º 1
0
 def test_get_context_data(self, **kwargs):
     view = SubmitTranslationView()
     view.request = self.factory.get("/path/does/not/matter/")
     view.object = self.en_homepage
     context = view.get_context_data()
     self.assertIn("form", context.keys())
     self.assertIsInstance(context["form"], SubmitTranslationForm)
Ejemplo n.º 2
0
 def test_get_form(self):
     view = SubmitTranslationView()
     view.request = self.factory.get("/path/does/not/matter/")
     view.object = self.en_homepage
     form = view.get_form()
     self.assertIsInstance(form, SubmitTranslationForm)