Skip to content
Browse files

fix tests

  • Loading branch information...
1 parent 92eabb9 commit 202bba16950d8f78d083394bf0c4590d249070ed @benoitc benoitc committed Sep 18, 2010
Showing with 8 additions and 6 deletions.
  1. +3 −0 couchapp/client.py
  2. +1 −1 setup.py
  3. +4 −5 tests/test_cli.py
View
3 couchapp/client.py
@@ -210,6 +210,9 @@ def __init__(self, uri, create=True, **client_opts):
self.res.head()
except ResourceNotFound:
self.res.put()
+
+ def delete(self):
+ self.res.delete()
def info(self):
"""
View
2 setup.py
@@ -88,7 +88,7 @@ def finalize_options(self):
cmdclass=cmdclass,
install_requires = [
- 'restkit>=2.1.0'
+ 'restkit>=2.2.0'
],
options = dict(py2exe={'dll_excludes': [ "kernelbase.dll", "powrprof.dll" ]},
View
9 tests/test_cli.py
@@ -27,7 +27,8 @@ def _tempdir():
class CliTestCase(unittest.TestCase):
def setUp(self):
- self.db = Database('http://127.0.0.1:5984/couchapp-test')
+ self.db = Database('http://127.0.0.1:5984/couchapp-test',
+ create=True)
self.tempdir = _tempdir()
os.makedirs(self.tempdir)
@@ -36,10 +37,7 @@ def setUp(self):
self.startdir = os.getcwd()
def tearDown(self):
- try:
- self.db.delete()
- except:
- pass
+ self.db.delete()
deltree(self.tempdir)
os.chdir(self.startdir)
@@ -236,6 +234,7 @@ def testPushDocs(self):
(child_stdin, child_stdout, child_stderr) = popen3("%s pushdocs docs/ http://127.0.0.1:5984/couchapp-test" % self.cmd)
alldocs = self.db.all_docs()['rows']
+
self.assert_(len(alldocs) == 2)
self.assert_('_design/app1' == alldocs[0]['id'])

0 comments on commit 202bba1

Please sign in to comment.
Something went wrong with that request. Please try again.