示例#1
0
def test_is_definition():
    # Arrange
    test_api = CobblerAPI()
    mgmtclass = Mgmtclass(test_api)

    # Act
    mgmtclass.is_definition = False

    # Assert
    assert not mgmtclass.is_definition
示例#2
0
def test_class_name():
    # Arrange
    test_api = CobblerAPI()
    mgmtclass = Mgmtclass(test_api)

    # Act
    mgmtclass.class_name = ""

    # Assert
    assert mgmtclass.class_name == ""
示例#3
0
def test_params():
    # Arrange
    test_api = CobblerAPI()
    mgmtclass = Mgmtclass(test_api)

    # Act
    mgmtclass.params = ""

    # Assert
    assert mgmtclass.params == {}
示例#4
0
def test_files():
    # Arrange
    test_api = CobblerAPI()
    mgmtclass = Mgmtclass(test_api)

    # Act
    mgmtclass.files = ""

    # Assert
    assert mgmtclass.files == []
示例#5
0
def test_make_clone():
    # Arrange
    test_api = CobblerAPI()
    mgmtclass = Mgmtclass(test_api)

    # Act
    result = mgmtclass.make_clone()

    # Arrange
    assert result != mgmtclass
示例#6
0
def test_check_if_valid():
    # Arrange
    test_api = CobblerAPI()
    mgmtclass = Mgmtclass(test_api)
    mgmtclass.name = "unittest_mgmtclass"

    # Act
    mgmtclass.check_if_valid()

    # Assert
    assert True
示例#7
0
def test_object_creation():
    # Arrange
    test_api = CobblerAPI()

    # Act
    mgmtclass = Mgmtclass(test_api)

    # Arrange
    assert isinstance(mgmtclass, Mgmtclass)