Permalink
Browse files

removed duplicate var in code.

  • Loading branch information...
1 parent 5506770 commit ad1d25d07067115b9aca85be75fc4d7f3d32ac37 Peter Park committed with anandology Mar 10, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 cookbook/testing_with_paste_and_nose.md
@@ -18,8 +18,8 @@ You want to test your web.py application.
class TestCode():
def test_index(self):
middleware = []
- app = TestApp(app.wsgifunc(*middleware))
- r = app.get('/')
+ testApp = TestApp(app.wsgifunc(*middleware))
+ r = testApp.get('/')
assert_equal(r.status, 200)
r.mustcontain('Hello, world!')
@@ -42,7 +42,7 @@ Most of the code example above should be fairly self-explanatory. From our main
To set up the test, we pass its wsgifunc() to Paste's TestApp, as you have already seen in the example.
- app = TestApp(app.wsgifunc(*middleware))
+ testApp = TestApp(app.wsgifunc(*middleware))
assert_equal() is one of the methods provided by nose's utils, and works just like unittest's assertEqual().
@@ -66,4 +66,4 @@ Then, it's simply a matter of running nosetests like so:
WEBPY_ENV=test nosetests
-The is_test() function comes in handy for other things, such as doing conditional database commits to avoid test database pollution.
+The is_test() function comes in handy for other things, such as doing conditional database commits to avoid test database pollution.

0 comments on commit ad1d25d

Please sign in to comment.