Esempio n. 1
0
    def test_submitted_success(self):
        self._registerFactory()
        self._registerLayoutProvider()

        request = DummyRequest(
            params=MultiDict({"form.submitted": "1", "title": "title", "description": "abc", "tags": "thetesttag"})
        )
        context = DummyModel()
        context.ordering = DummyOrdering()
        context.catalog = DummyCatalog()
        response = self._callFUT(context, request)
        self.assertEqual(response.location, "http://example.com/title/")
        self.assertEqual(context["title"].title, "title")
        self.assertEqual(context["title"].description, "abc")
        self.assertEqual(context["title"].creator, None)