Permalink
Browse files

coverage

  • Loading branch information...
mcdonc committed Apr 9, 2012
1 parent ba4c0d7 commit 85ec6b1032a3680bb49c60fed0551bc8606536a2
Showing with 12 additions and 0 deletions.
  1. +12 −0 substanced/folder/tests.py
View
@@ -355,6 +355,18 @@ def test_resolveable_unicode_getitem(self):
folder[name] = DummyModel()
self.failUnless(folder[name])
+ def test_get_service_missing(self):
+ inst = self._makeOne()
+ self.assertEqual(inst.get_service('abc'), None)
+
+ def test_get_service_found(self):
+ inst = self._makeOne()
+ inst2 = self._makeOne()
+ inst3 = self._makeOne()
+ inst.add('__services__', inst2, allow_services=True)
+ inst2['abc'] = inst3
+ self.assertEqual(inst.get_service('abc'), inst3)
+
class DummyModel:
pass

0 comments on commit 85ec6b1

Please sign in to comment.