[cse491] Initial set of tests for HW #7
C. Titus Brown
ctb at msu.edu
Wed Oct 8 08:36:35 PDT 2008
On Wed, Oct 08, 2008 at 11:29:21AM -0400, Edward Waller wrote:
-> Um, you're testing that we get a 404 on
->
-> code, _, _ = webserve.delegate('GET', '/', [], None)
-> assert code == 404
->
-> code, _, _ = webserve.delegate('GET', '/foo', [], None)
-> assert code == 404
->
-> code, _, _ = webserve.delegate('GET', '/bar', [], None)
-> assert code == 404
->
-> code, _, _ = webserve.delegate('GET', '/other/path', [], None)
-> assert code == 404
->
-> but also:
->
-> code, headers, data = webserve.delegate('GET',
-> '/test/path',
-> [],
-> None)
-> assert code == 200
-> assert '/test/path' in data
->
-> So is /test/path one of the valid paths? It seems like that's a path
-> just for testing... so that should be asserting a 404 too?
Err, not sure what you're asking, but it is entirely possible to pass
all of the tests with a single server :). So, yes, '/test/path' is a
path just for testing, and it returns something specific; and all paths
not explicitly required to work in the tests should return 404. Does
that make sense?
You can also try out my test server,
http://class.ged.idyll.org:8080/
cheers,
--titus
--
C. Titus Brown, ctb at msu.edu
More information about the cse491-fall-2008
mailing list