From 30b11b1cc48bbe683e6a6f112e76baeee6a89841 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 26 Jan 2010 15:06:47 +0200 Subject: [PATCH] Added feed controller --- run-server | 2 +- scribeengine/controllers/feed.py | 16 ++++++++++++++++ scribeengine/tests/functional/test_feed.py | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 scribeengine/controllers/feed.py create mode 100644 scribeengine/tests/functional/test_feed.py diff --git a/run-server b/run-server index 534e752..3cc02c7 100755 --- a/run-server +++ b/run-server @@ -1 +1 @@ -/home/raoul/VirtualEnv/ScribeEngine/trunk/bin/paster serve development.ini --reload +/home/raoul/VirtualEnv/ScribeEngine/feeds/bin/paster serve development.ini --reload diff --git a/scribeengine/controllers/feed.py b/scribeengine/controllers/feed.py new file mode 100644 index 0000000..5a86c5c --- /dev/null +++ b/scribeengine/controllers/feed.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 FeedController(BaseController): + + def index(self): + # Return a rendered template + #return render('/feed.mako') + # or, return a response + return 'Hello World' diff --git a/scribeengine/tests/functional/test_feed.py b/scribeengine/tests/functional/test_feed.py new file mode 100644 index 0000000..b9702ee --- /dev/null +++ b/scribeengine/tests/functional/test_feed.py @@ -0,0 +1,7 @@ +from scribeengine.tests import * + +class TestFeedController(TestController): + + def test_index(self): + response = self.app.get(url(controller='feed', action='index')) + # Test response...