this could use more logic:
test = query_dict['test']
platform = query_dict['platform']
revision = query_dict['revision']

if test or platform or revision:
    whereclause = "where "
    if test:
        whereclause += "test='%s'"  % test

of course you need more logic to make the 'and' work properly, but it should be fairly easy.  In fact, I would like to see it more like this:
for field in ['test', 'platform', 'rev']:
    if urlparams[field]:
        whereclause += " and %s='%s'" % (field, urlparams[field])

this would allow for future fields to be added with little work :)