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
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
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
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)
def testNonExistentObjectId(self): objectId = base.randomObjectIdStr() return self.deleteTagValue(defaults.sep.join(paths.aboutPath()), objectId)
def testNotImplemented(self): d = self.getPage(base.randomObjectIdStr()) d.addErrback(self.checkErrorStatus, http.NOT_IMPLEMENTED) self.failUnlessFailure(d, Error) return d
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
def testNonExistent(self): objectId = base.randomObjectIdStr() objectInfo = yield self.getObject(objectId, showAbout=True) self.assertEqual(objectInfo['about'], None) self.assertEqual(objectInfo['tagPaths'], [])
def testNonExistentObjectId(self): path = 'fluiddb/testing/test1' objectId = base.randomObjectIdStr() return self.deleteTagValue(path, objectId)
def testNonExistentObjectId(self): aboutPath = defaults.sep.join(paths.aboutPath()) objectId = base.randomObjectIdStr() exists = yield self.hasTagValue(aboutPath, objectId) self.assertFalse(exists)