示例#1
0
 def testNotImplemented(self):
     headers = {
         'accept': 'application/json',
     }
     self.addBasicAuthHeader(headers)
     d = self.getPage(base.randomObjectIdStr(), headers=headers)
     d.addErrback(self.checkErrorStatus, http.NOT_ALLOWED)
     self.failUnlessFailure(d, Error)
     return d
示例#2
0
 def testNotImplemented(self):
     headers = {
         'accept': 'application/json',
     }
     self.addBasicAuthHeader(headers)
     d = self.getPage(base.randomObjectIdStr(), headers=headers)
     d.addErrback(self.checkErrorStatus, http.NOT_ALLOWED)
     self.failUnlessFailure(d, Error)
     return d
示例#3
0
    def testNotImplemented(self):
        headers = {
            'accept': 'application/json',
        }
        self.addBasicAuthHeader(headers)
        d = self.getPage(base.randomObjectIdStr(), headers=headers)
#         TODO: Nginx returns 411 in this case. See Bug #676947.
#        d.addErrback(self.checkErrorStatus, http.NOT_IMPLEMENTED)
        self.failUnlessFailure(d, Error)
        return d
示例#4
0
 def testNotImplemented(self):
     headers = {
         'accept': 'application/json',
     }
     self.addBasicAuthHeader(headers)
     d = self.getPage(base.randomObjectIdStr(), headers=headers)
     #         TODO: Nginx returns 411 in this case. See Bug #676947.
     #        d.addErrback(self.checkErrorStatus, http.NOT_IMPLEMENTED)
     self.failUnlessFailure(d, Error)
     return d
示例#5
0
 def testNonExistentObjectId(self):
     aboutPath = defaults.sep.join(paths.aboutPath())
     objectId = base.randomObjectIdStr()
     d = self.getTagValue(aboutPath, objectId)
     d.addErrback(self.checkErrorStatus, http.NOT_FOUND)
     d.addErrback(
         self.checkErrorHeaders,
         {buildHeader('Error-Class'): TNoInstanceOnObject.__name__})
     self.failUnlessFailure(d, Error)
     return d
示例#6
0
 def testPlausibleButNonExistentObjectId(self):
     # Here we use an object ID that is syntactically a UUID, though
     # it's guaranteed not to exist in FluidDB (see base.py).
     #
     # For now this succeeds as we do not require that an object exist
     # before you put a value onto it.
     path = 'fluiddb/testing/test1'
     value = 'floppy disks, FTW!'
     objectId = base.randomObjectIdStr()
     try:
         yield self.setTagValue(path, objectId, value)
         result = yield self.getTagValue(path, objectId)
         self.assertEqual(result, value)
     finally:
         yield self.deleteTagValue(path, objectId)
示例#7
0
 def testNonExistentObjectId(self):
     objectId = base.randomObjectIdStr()
     return self.deleteTagValue(defaults.sep.join(paths.aboutPath()),
                                objectId)
示例#8
0
 def testNotImplemented(self):
     d = self.getPage(base.randomObjectIdStr())
     d.addErrback(self.checkErrorStatus, http.NOT_IMPLEMENTED)
     self.failUnlessFailure(d, Error)
     return d
示例#9
0
 def testNotImplemented(self):
     d = self.getPage(base.randomObjectIdStr())
     #        TODO: Nginx returns 411 in this case. See Bug #676947.
     #        d.addErrback(self.checkErrorStatus, http.NOT_IMPLEMENTED)
     self.failUnlessFailure(d, Error)
     return d
示例#10
0
 def testNonExistent(self):
     objectId = base.randomObjectIdStr()
     objectInfo = yield self.getObject(objectId, showAbout=True)
     self.assertEqual(objectInfo['about'], None)
     self.assertEqual(objectInfo['tagPaths'], [])
示例#11
0
 def testNonExistent(self):
     objectId = base.randomObjectIdStr()
     objectInfo = yield self.getObject(objectId, showAbout=True)
     self.assertEqual(objectInfo['about'], None)
     self.assertEqual(objectInfo['tagPaths'], [])
示例#12
0
 def testNonExistentObjectId(self):
     path = 'fluiddb/testing/test1'
     objectId = base.randomObjectIdStr()
     return self.deleteTagValue(path, objectId)
示例#13
0
 def testNonExistentObjectId(self):
     aboutPath = defaults.sep.join(paths.aboutPath())
     objectId = base.randomObjectIdStr()
     exists = yield self.hasTagValue(aboutPath, objectId)
     self.assertFalse(exists)