On Tue, Feb 24, 2009 at 7:49 PM, Domingo Aguilera
<[email protected]> wrote:
> I have python 2.6 , couchdb-python rev:134, httplib2 rev:276, couchdb rev:
> 747599
>
> The output of client.py test is...
> http://gist.github.com/69938
>
> On Tue, Feb 24, 2009 at 4:20 PM, Christopher Lenz <[email protected]> wrote:
>
>> On 24.02.2009, at 23:05, Domingo Aguilera wrote:
>>
>>> I've updated couchdb and couchdb-python ( also httplib2 ) from svn
>>> repositories.
>>>
>>> Some test python scripts ( client.py and couch_tests.py are not working )?
>>> Are these scripts supposed to be working good or not yet?
>>>
>>
>> What versions of CouchDB and couchdb-python are you using? Also, can you
>> include the error output from the tests?
>>
>> Cheers,
>> --
>> Christopher Lenz
>> cmlenz at gmx.de
>> http://www.cmlenz.net/
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
upon making the edit, the tests for client.py run succesfully
(demo-couchdb)j...@jlh-d520:~/Projects/venvs/demo-couchdb/lib/python2.5/site-packages/CouchDB-0.5-py2.5.egg/couchdb$
nosetests -v --with-doctest client.py
Doctest: couchdb.client ... ok
Doctest: couchdb.client.Database ... ok
Doctest: couchdb.client.Database.delete ... ok
Doctest: couchdb.client.Database.query ... ok
Doctest: couchdb.client.Database.update ... ok
Doctest: couchdb.client.Database.view ... ok
Doctest: couchdb.client.Server ... ok
Doctest: couchdb.client.ViewResults ... ok
Doctest: couchdb.client.uri ... ok
----------------------------------------------------------------------
Ran 9 tests in 1.008s
OK