예제 #1
0
def test_standard_fire():
    global _test_obj
    assert _test_obj is None
    fishhook.core.TACKLEBOX = 'tests/resources/tacklebox'

    tobj = {'foo': 'foo', 'bar': 'bar', 'baz': 'foo'}
    fire(None, 'alpha', tobj)
    assert _test_obj == tobj
예제 #2
0
def test_standard_fire():
    global _test_obj
    assert _test_obj is None
    fishhook.core.TACKLEBOX = 'tests/resources/tacklebox'

    tobj = {
        'foo': 'foo',
        'bar': 'bar',
        'baz': 'foo'
    }
    fire(None, 'alpha', tobj)
    assert _test_obj == tobj
예제 #3
0
def test_callee():
    global _callees
    fishhook.core.TACKLEBOX = 'tests/resources/tacklebox'

    assert _callees == []
    fire(None, 'beta', {})
    assert _callees == [None]
    fire('foo', 'beta', {})
    assert _callees == [None, 'foo']
    fire('foo', 'alpha', {})
    assert _callees == [None, 'foo']