def test_remove_provider(self): ij = Injector() ij.add_value('val', 5) ij.remove('val') def test(val): pass with self.assertRaises(InjectError): ij.call_inject(test)