Пример #1
0
 def test_02_drop_database(self):
   dbname = config.get(env, 'dbname')
   self.server.create_database(dbname)
   self.server.drop_database(dbname)
   @raises(couchdb.ResourceNotFound)
   def check():
     self.couchdb_server[dbname]
   check()
Пример #2
0
 def test_03_check_views(self):
   # setup
   dbname = config.get(env, 'dbname')
   self.server.create_database(dbname)
   db = self.server.connect(dbname)
   db.check_views()
   # test
   design = db.get(db.design_name)
   ok_(design)
   ok_(design['views'])
   eq_(Database.version, design['version'])
   # cleanup
   self.server.drop_database(dbname)
Пример #3
0
 def test_01_create_database(self):
   dbname = config.get(env, 'dbname')
   self.server.create_database(dbname)
   ok_(self.couchdb_server[dbname])
Пример #4
0
 def setUp(self):
   url = config.get(env, 'url')
   self.server = Server(url)
   self.couchdb_server = couchdb.Server(url)