From 705a88c54d889577ecc6c03da80e8d3a15e5cea2 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Mon, 12 Apr 2010 13:21:00 +0200 Subject: [PATCH] Added the media controller. --- scribeengine/controllers/media.py | 16 ++++++++++++++++ scribeengine/tests/functional/test_media.py | 7 +++++++ 2 files changed, 23 insertions(+) create mode 100644 scribeengine/controllers/media.py create mode 100644 scribeengine/tests/functional/test_media.py diff --git a/scribeengine/controllers/media.py b/scribeengine/controllers/media.py new file mode 100644 index 0000000..a4c1487 --- /dev/null +++ b/scribeengine/controllers/media.py @@ -0,0 +1,16 @@ +import logging + +from pylons import request, response, session, tmpl_context as c +from pylons.controllers.util import abort, redirect_to + +from scribeengine.lib.base import BaseController, render + +log = logging.getLogger(__name__) + +class MediaController(BaseController): + + def index(self): + # Return a rendered template + #return render('/media.mako') + # or, return a response + return 'Hello World' diff --git a/scribeengine/tests/functional/test_media.py b/scribeengine/tests/functional/test_media.py new file mode 100644 index 0000000..5207fba --- /dev/null +++ b/scribeengine/tests/functional/test_media.py @@ -0,0 +1,7 @@ +from scribeengine.tests import * + +class TestMediaController(TestController): + + def test_index(self): + response = self.app.get(url(controller='media', action='index')) + # Test response...