summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests/test_location.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-10-25 10:29:31 -0400
committerChris McDonough <chrism@plope.com>2010-10-25 10:29:31 -0400
commit64372401084889a440c9d990a0febc221e3e4b5c (patch)
treec8939a341505d19f19fa6918d264b4e1d95326f8 /repoze/bfg/tests/test_location.py
parentc8e78c2037806f3e5dab57de635bf80865b7061d (diff)
downloadpyramid-64372401084889a440c9d990a0febc221e3e4b5c.tar.gz
pyramid-64372401084889a440c9d990a0febc221e3e4b5c.tar.bz2
pyramid-64372401084889a440c9d990a0febc221e3e4b5c.zip
first pass at converting bfg to pyramid namespace
Diffstat (limited to 'repoze/bfg/tests/test_location.py')
-rw-r--r--repoze/bfg/tests/test_location.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/repoze/bfg/tests/test_location.py b/repoze/bfg/tests/test_location.py
deleted file mode 100644
index 9b8360f8b..000000000
--- a/repoze/bfg/tests/test_location.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import unittest
-
-class TestInside(unittest.TestCase):
- def _callFUT(self, one, two):
- from repoze.bfg.location import inside
- return inside(one, two)
-
- def test_inside(self):
- o1 = Location()
- o2 = Location(); o2.__parent__ = o1
- o3 = Location(); o3.__parent__ = o2
- o4 = Location(); o4.__parent__ = o3
-
- self.assertEqual(self._callFUT(o1, o1), True)
- self.assertEqual(self._callFUT(o2, o1), True)
- self.assertEqual(self._callFUT(o3, o1), True)
- self.assertEqual(self._callFUT(o4, o1), True)
- self.assertEqual(self._callFUT(o1, o4), False)
- self.assertEqual(self._callFUT(o1, None), False)
-
-class TestLineage(unittest.TestCase):
- def _callFUT(self, context):
- from repoze.bfg.location import lineage
- return lineage(context)
-
- def test_lineage(self):
- o1 = Location()
- o2 = Location(); o2.__parent__ = o1
- o3 = Location(); o3.__parent__ = o2
- o4 = Location(); o4.__parent__ = o3
- result = list(self._callFUT(o3))
- self.assertEqual(result, [o3, o2, o1])
- result = list(self._callFUT(o1))
- self.assertEqual(result, [o1])
-
-from repoze.bfg.interfaces import ILocation
-from zope.interface import implements
-class Location(object):
- implements(ILocation)
- __name__ = __parent__ = None