[cse491] Initial set of tests for HW #7

Edward Waller wallered at msu.edu
Wed Oct 8 08:29:21 PDT 2008


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?

On Oct 8, 2008, at 11:14 AM, C. Titus Brown wrote:

> Hi all,
>
> I still haven't finished writing up HW #7, but here is an initial stab
> at the tests:
>
> http://class.ged.idyll.org/svn/files/hw-7/webserve-test.py
>
> If you find HW #6 to be pretty easy, I'd suggest working on making  
> your
> Web server pass these tests, too.
>
> More to come.
>
> --titus
> -- 
> C. Titus Brown, ctb at msu.edu
>
> _______________________________________________
> cse491-fall-2008 mailing list
> cse491-fall-2008 at lists.idyll.org
> http://lists.idyll.org/listinfo/cse491-fall-2008
>




More information about the cse491-fall-2008 mailing list