| Index: third_party/twisted_8_1/twisted/test/test_roots.py
|
| diff --git a/third_party/twisted_8_1/twisted/test/test_roots.py b/third_party/twisted_8_1/twisted/test/test_roots.py
|
| deleted file mode 100644
|
| index 023b8fe176dad931fd293d36c8fd398809cdbc9c..0000000000000000000000000000000000000000
|
| --- a/third_party/twisted_8_1/twisted/test/test_roots.py
|
| +++ /dev/null
|
| @@ -1,63 +0,0 @@
|
| -# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
|
| -# See LICENSE for details.
|
| -
|
| -from twisted.trial import unittest
|
| -from twisted.python import roots
|
| -import types
|
| -
|
| -class RootsTest(unittest.TestCase):
|
| -
|
| - def testExceptions(self):
|
| - request = roots.Request()
|
| - try:
|
| - request.write("blah")
|
| - except NotImplementedError:
|
| - pass
|
| - else:
|
| - self.fail()
|
| - try:
|
| - request.finish()
|
| - except NotImplementedError:
|
| - pass
|
| - else:
|
| - self.fail()
|
| -
|
| - def testCollection(self):
|
| - collection = roots.Collection()
|
| - collection.putEntity("x", 'test')
|
| - self.failUnlessEqual(collection.getStaticEntity("x"),
|
| - 'test')
|
| - collection.delEntity("x")
|
| - self.failUnlessEqual(collection.getStaticEntity('x'),
|
| - None)
|
| - try:
|
| - collection.storeEntity("x", None)
|
| - except NotImplementedError:
|
| - pass
|
| - else:
|
| - self.fail()
|
| - try:
|
| - collection.removeEntity("x", None)
|
| - except NotImplementedError:
|
| - pass
|
| - else:
|
| - self.fail()
|
| -
|
| - def testConstrained(self):
|
| - class const(roots.Constrained):
|
| - def nameConstraint(self, name):
|
| - return (name == 'x')
|
| - c = const()
|
| - self.failUnlessEqual(c.putEntity('x', 'test'), None)
|
| - self.failUnlessRaises(roots.ConstraintViolation,
|
| - c.putEntity, 'y', 'test')
|
| -
|
| -
|
| - def testHomogenous(self):
|
| - h = roots.Homogenous()
|
| - h.entityType = types.IntType
|
| - h.putEntity('a', 1)
|
| - self.failUnlessEqual(h.getStaticEntity('a'),1 )
|
| - self.failUnlessRaises(roots.ConstraintViolation,
|
| - h.putEntity, 'x', 'y')
|
| -
|
|
|