Mercurial > nosedjango
comparison examples/project/zoo/test_urlconf.py @ 11:9af906a73061
added a 404.html file and updated the testcases to run against Django svn rev 8693 (post 1.0b1)
author | Victor Ng <victor@monkeybean.ca> |
---|---|
date | Fri, 29 Aug 2008 00:46:22 -0400 |
parents | 35178e70f1cd |
children |
comparison
equal
deleted
inserted
replaced
10:3b9fe61973cf | 11:9af906a73061 |
---|---|
7 We're using the standard ROOT_URLCONF, so we need to | 7 We're using the standard ROOT_URLCONF, so we need to |
8 pass in /zoo/, just the empty string | 8 pass in /zoo/, just the empty string |
9 ''' | 9 ''' |
10 c = Client() | 10 c = Client() |
11 resp = c.get('') | 11 resp = c.get('') |
12 assert resp.status_code == 500 | 12 assert resp.status_code == 404, "Got status %s - expecting 404" % resp.status_code |
13 | 13 |
14 c = Client() | 14 c = Client() |
15 resp = c.get('/zoo/') | 15 resp = c.get('/zoo/') |
16 assert "Just a title" in resp.content | 16 assert "Just a title" in resp.content |
17 assert "foobar" in resp.content | 17 assert "foobar" in resp.content |
29 assert "Just a title" in resp.content | 29 assert "Just a title" in resp.content |
30 assert "foobar" in resp.content | 30 assert "foobar" in resp.content |
31 | 31 |
32 c = Client() | 32 c = Client() |
33 resp = c.get('/zoo/') | 33 resp = c.get('/zoo/') |
34 assert resp.status_code == 500 | 34 assert resp.status_code == 404, "Got status %s - expecting 404" % resp.status_code |
35 | 35 |
36 | 36 |
37 | 37 |
38 | 38 |