Beispiel #1
0
    def edit(self, **appstruct):

        FileEditForm.edit(self, **appstruct)

        if appstruct['external_url']:
            self.context.data = None
            self.context.filename = None
            self.context.mimetype = None
            self.context.size = None
            self.context.external_url = appstruct['external_url']
        else:  # pragma: no cover
            # can't find a way to test this, so maybe we never get here.  let's
            # still leave it as a safety belt.
            self.context.external_url = None
Beispiel #2
0
    def make_one(self):
        from kotti.views.edit.content import FileEditForm
        from kotti.resources import File

        return FileEditForm(File(), DummyRequest())
Beispiel #3
0
 def make_one(self):
     from kotti.views.edit.content import FileEditForm
     return FileEditForm(MagicMock(), DummyRequest())