gregorrothfuss / feedvalidator

Automatically exported from code.google.com/p/feedvalidator
0 stars 0 forks source link

empty document base URI trips up xml:base parsing #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. validate a feed with xml:base attribute
2. using the rawdata method
3. the validator dies with exception 
AttributeError: 'NoneType' object has no attribute 'split' 

tested using the latest svn version. 
Patched validators.py to work around the exception. See attached file.

More info in thread (including test case and stack trace):
http://lists.w3.org/Archives/Public/www-validator/2007Jun/thread.html#msg45

Thanks

Original issue reported on code.google.com by olivier....@gmail.com on 14 Jun 2007 at 7:03

Attachments:

GoogleCodeExporter commented 9 years ago
Welcome back!

Original comment by sa3ruby@gmail.com on 14 Jun 2007 at 7:44

GoogleCodeExporter commented 9 years ago
Thanks Sam!

Before commiting the patch I was thinking of adding the test case that helped me
pinpoint the issue into the test suite, but I'm not sure whether/how it fits 
within
the organization in must|warning of the test suite. Should it be put into
testcases/xml/must and have 

Expect:       !Error

in the test case description?

Thanks.

Original comment by olivier....@gmail.com on 15 Jun 2007 at 8:35

GoogleCodeExporter commented 9 years ago
If the problem can be reproduced with a simple feed, that would be fine.  

If you want to create unit tests that can't be duplicated simply with a feed, 
you can
create Python standard unit tests in src/tests.  If you create a new module, 
make
sure that you add it to the list in runtest.py.

Also, feel free to add tests that involve functionality in support of either 
the SOAP
interface or the form input.

Original comment by sa3ruby@gmail.com on 15 Jun 2007 at 9:12