def test_call_alternative(self): def myservice(): return _LENIENT.__dict__.copy() qualname_service = self.service.format("test_call_alternative") result = (_lenient_service())(myservice)() self.assertIn(qualname_service, result) self.assertTrue(result[qualname_service])
def test_args_not_callable(self): emsg = "Invalid lenient service argument, expecting a callable" with self.assertRaisesRegex(AssertionError, emsg): _lenient_service(None)
def test_args_too_many(self): emsg = "Invalid lenient service arguments, expecting 1" with self.assertRaisesRegex(AssertionError, emsg): _lenient_service(None, None)