Ejemplo n.º 1
0
def test_actions_are_grouped_no():
    editor = object()
    document = object()
    view = MockView(editor, document)

    action1 = MockEditAction(view)
    action2 = MockEditAction(view)

    assert not actions_are_grouped(action1, action2)
Ejemplo n.º 2
0
def test_actions_are_grouped_yes():
    editor = object()
    document = object()
    view = MockView(editor, document)

    action1 = MockEditAction(view)
    action1.grouped = hash(action1)
    action2 = MockEditAction(view)
    action2.grouped = hash(action1)

    assert actions_are_grouped(action1, action2)