def makeApp(self, resources, properties): class Backend(object): get_resource = resources.get app = WebDAVApp(Backend()) app.register_properties(properties) return app
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)
def makeApp(self, backend): app = WebDAVApp(backend) app.register_methods([caldav.MkcalendarMethod()]) return app