source: gutenbach-web/test_root.py @ 973dd91

debianmacno-cupsweb
Last change on this file since 973dd91 was 973dd91, checked in by Edward Z. Yang <edwardzyang@…>, 16 years ago

Initial commit.

Signed-off-by: Edward Z. Yang <edwardzyang@…>

  • Property mode set to 100644
File size: 947 bytes
RevLine 
[973dd91]1# -*- coding: utf-8 -*-
2
3from sipbmp3web.tests import TestController
4from nose.tools import assert_true
5
6# This is an example of how you can write functional tests for your controller.
7# As opposed to a pure unit-test which test a small unit of functionallity,
8# these functional tests exercise the whole app and it's WSGI stack.
9# Please read http://pythonpaste.org/webtest/ for more information
10
11class TestRootController(TestController):
12    def test_index(self):
13        response = self.app.get('/')
14        msg = 'TurboGears 2 is rapid web application development toolkit '\
15              'designed to make your life easier.'
16        # You can look for specific strings:
17        assert_true(msg in response)
18        # You can also access a BeautifulSoup'ed version
19        # first run $ easy_install BeautifulSoup and then run this test
20        links = response.html.findAll('a')
21        assert_true(links, "Mummy, there are no links here!")
Note: See TracBrowser for help on using the repository browser.