示例#1
0
文件: test_tx.py 项目: ingmar/fom
 def testLogin(self):
     fdb = FluidApi(self.db)
     self.db.login('test', 'test')
     resp = yield fdb.namespaces['test'].put(
         description='Test user namespace')
     self.assertEqual(resp.status, 204)
     self.assertEqual(resp.content, '')
示例#2
0
 def __init__(self, base_url=BASE_URL):
     FluidApi.__init__(self, FluidDB(base_url))
示例#3
0
文件: test_errors.py 项目: ingmar/fom
 def setUp(self):
     self.db = FakeFluidDB()
     self.api = FluidApi(self.db)
示例#4
0
 def __init__(self, base_url=None):
     if base_url is not None:
         db = FluidDB(base_url)
     else:
         db = FluidDB()
     FluidApi.__init__(self, db)
示例#5
0
文件: test_tx.py 项目: ingmar/fom
 def testError(self):
     fdb = FluidApi(self.db)
     d = fdb.namespaces['test'].put(description='Oh deary')
     return self.assertFailure(d, errors.Fluid401Error)
示例#6
0
文件: test_tx.py 项目: ingmar/fom
 def testApi(self):
     fdb = FluidApi(self.db)
     resp = yield fdb.users['test'].get()
     self.assertEqual(resp.value[u'name'], 'test')