示例#1
0
def test_melt__meltable_returns_True():
    m = MaterialComponent('PLASTIC', 'MELT')
    assert m.melt()
示例#2
0
def test_melt__meltable_calls_add_erosion(mocker):
    mocker.patch('components.material.MaterialComponent.add_erosion')
    m = MaterialComponent('PLASTIC', 'MELT')
    m.melt()
    m.add_erosion.assert_called_once()
示例#3
0
def test_melt__nonmeltable_returns_False():
    m = MaterialComponent('WOOD', 'BURN')
    assert m.melt() is False