I've just checked in an updated version of the AppClientTest, a program for testing your AtomPub service. It has been updated to use the atompubbase module and also sports HTML output as an option. To make it easier to develop I've transcluded via svn:externals all the libraries you will need as long as you are running Python 2.5. You will need to install elementtree if you are on something older than 2.5. The transcluding means it is this easy to get up and running from svn:
$ svn co http://feedvalidator.googlecode.com/svn/trunk/apptestsuite/client/validator/ validator $ python validator/appclienttest.py --output=results.html "http://bitworking.org/projects/apptestsite/app.cgi/service/;service_document" $ firefox results.html
Here are the command line options:
$ python validator/appclienttest.py --help
usage: appclienttest.py [options]
-h, --help show this help message and exit
--credentials=FILE FILE that contains a name and password on separate lines
with an optional third line with the authentication type
of 'ClientLogin <service>'.
--output=FILE FILE to store test results
--verbose Print extra information while running.
--quiet Do not print anything while running.
--debug Print low level HTTP information while running.
--html Output is formatted in HTML
The code is far from complete. It does most of the tests of Tim's APE (with the exception of categories), but there are many more tests to add. The next step for me is to add unit tests for appclienttest.py, which should be fairly simple given the structure of atompubbase, and the use of MockHttp.
Posted by Noah Slater on 2008-02-29
Fixed, and thanks!
Posted by Joe on 2008-02-29
I will try a fresh install myself, but in case I can't get it to repeat can you send me the complete stack trace?
Posted by Joe on 2008-02-29
Posted by Keith Fahlgren on 2008-02-29
Fine, more tests. It caught some problems the ape didn't notice already.
The new script says that it's an error to omit the Content-Location header on creation, yet the spec says it's optional. Most examples in the spec don't include it either. I fixed it, but shouldn't it be a warning?
Also, it checks for an empty summary and author when uploading an image. Isn't it better to have an empty summary than a nonsensical summary, like the "djeihhjdga.gif" Wordpress fills in, given the recent discussion on the alt attribute in HTML? (I guess it's the feedvalidator that's reporting this, just like the namespace prefix warnings)
Posted by Jeroen Hoekx on 2008-03-01
You are correct that all of the format checks are being done by the feedvalidator code.
That check should be for the Location: header and not the Content-location: header. I will fix that, thanks!
Posted by Joe on 2008-03-01
(most recent call last): File "validator/appclienttest.py", line 345, in run test_member_function() File "validator/appclienttest.py", line 549, in testEntry_Collection entry_collections = list(service.iter_match("application/atom+xml;type=entry"))
Posted by Morten Høybye Frederiksen on 2008-02-29