Esempio n. 1
0
def test__whitelist_replaces_prepare_only_once():
    h = _Handler()
    tornado._whitelist(h)
    new_prepare = h.prepare
    tornado._whitelist(h)
    assert h.prepare == new_prepare
Esempio n. 2
0
def test__whitelist_replaces_prepare_only_once():
    h = _Handler()
    tornado._whitelist(h)
    new_prepare = h.prepare
    tornado._whitelist(h)
    assert h.prepare == new_prepare
Esempio n. 3
0
def test__whitelist_replaces_prepare():
    h = _Handler()
    old_prepare = h.prepare
    tornado._whitelist(h)
    assert h.prepare != old_prepare
    assert hasattr(h.prepare, 'patched')
Esempio n. 4
0
def test__whitelist_replaces_prepare():
    h = _Handler()
    old_prepare = h.prepare
    tornado._whitelist(h)
    assert h.prepare != old_prepare
    assert hasattr(h.prepare, 'patched')