source: web/old/test_root.py @ 31d7856

debianmacno-cupsweb
Last change on this file since 31d7856 was 30beeab, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago

Remove "gutenbach-" from directory names and rename "gutenbach" to "gutenbach-server"

  • Property mode set to 100644
File size: 947 bytes
Line 
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.