MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_kw_accept

Method test_kw_accept

test/base/test_events.py:408–419  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

406 return Target
407
408 def test_kw_accept(self):
409 TargetOne = self._fixture()
410
411 canary = Mock()
412
413 @event.listens_for(TargetOne, "event_one", named=True)
414 def handler1(**kw):
415 canary(kw)
416
417 TargetOne().dispatch.event_one(4, 5)
418
419 eq_(canary.mock_calls, [call({"x": 4, "y": 5})])
420
421 def test_kw_accept_wrapped(self):
422 TargetOne = self._wrapped_fixture()

Callers

nothing calls this directly

Calls 5

_fixtureMethod · 0.95
eq_Function · 0.90
callFunction · 0.85
TargetOneClass · 0.70
event_oneMethod · 0.45

Tested by

no test coverage detected