mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 11:04:01 +03:00
Adding inject() decorator tests
This commit is contained in:
parent
b0c2005288
commit
b5c1bea18f
|
@ -10,6 +10,8 @@ from objects.injections import inject
|
|||
|
||||
from objects.providers import NewInstance
|
||||
|
||||
from objects.providers import Error
|
||||
|
||||
|
||||
class InjectionTests(unittest.TestCase):
|
||||
|
||||
|
@ -133,3 +135,7 @@ class InjectTests(unittest.TestCase):
|
|||
self.assertIsInstance(b1, list)
|
||||
self.assertIsInstance(b2, list)
|
||||
self.assertIsNot(b1, b2)
|
||||
|
||||
def test_decorate_with_not_injection(self):
|
||||
"""Test `inject()` decorator with not an injection instance."""
|
||||
self.assertRaises(Error, inject, object)
|
||||
|
|
Loading…
Reference in New Issue
Block a user