couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: Some tests not working in couchdb-python
Date Wed, 25 Feb 2009 09:58:04 GMT
On 25.02.2009, at 04:42, Jeff Hinrichs - DM&T wrote:
> couchdb-python 0.5
>
> File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 337, in couchdb.client.Database.delete
> Failed example:
>    db.delete(doc)
> Expected:
>    Traceback (most recent call last):
>      ...
>    PreconditionFailed: ('conflict', 'Document update conflict.')
> Got:
>    Traceback (most recent call last):
>      File "/usr/lib/python2.5/doctest.py", line 1228, in __run
>        compileflags, 1) in test.globs
>      File "<doctest couchdb.client.Database.delete[7]>", line 1, in  
> <module>
>        db.delete(doc)
>      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 348, in delete
>        self.resource.delete(doc['_id'], rev=doc['_rev'])
>      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 829, in delete
>        return self._request('DELETE', path, headers=headers, **params)
>      File "/home/jlh/Projects/venvs/demo-couchdb/lib/python2.5/site- 
> packages/CouchDB-0.5-py2.5.egg/couchdb/client.py",
> line 886, in _request
>        raise ResourceConflict(error)
>    ResourceConflict: ('conflict', 'Document update conflict.')
>
> Need to replace PreconditionFailed with ResourceConflict

Yeah, that one should have been fixed in trunk:

   <http://code.google.com/p/couchdb-python/source/detail?r=131>

It was caused by a change of conflict status codes in CouchDB trunk.

Cheers,
Chris
--
Christopher Lenz
   cmlenz at gmx.de
   http://www.cmlenz.net/


Mime
View raw message