Exemple #1
0
def test_expandRecursive_noContainer():
    model = SettingDefinitionsModel()
    model.expand = MagicMock()
    model.expandRecursive("whatever")

    assert model.expanded == []
    assert model.expand.call_count == 0
Exemple #2
0
def test_expandRecursive_noDefinition():
    model = SettingDefinitionsModel()
    model._container = MagicMock()
    model._container.findDefinitions = MagicMock(return_value = False)
    model.expand = MagicMock()

    model.expandRecursive("whatever")

    assert model.expanded == []
    assert model.expand.call_count == 0