Beispiel #1
0
    def makeApp(self, resources, properties):
        class Backend(object):
            get_resource = resources.get

        app = WebDAVApp(Backend())
        app.register_properties(properties)
        return app
Beispiel #2
0
    def test_mkcol_ok(self):
        class Backend(object):
            def create_collection(self, relpath):
                pass

            def get_resource(self, relpath):
                return None
        app = WebDAVApp(Backend())
        code, headers, contents = self.mkcol(app, '/resource/bla')
        self.assertEqual('201 Created', code)
        self.assertEqual(b'', contents)
Beispiel #3
0
 def makeApp(self, backend):
     app = WebDAVApp(backend)
     app.register_methods([caldav.MkcalendarMethod()])
     return app