Beispiel #1
0
def test_exportsignatures_file(testpath):
    # Arrange
    os_signatures = Signatures()
    os_signatures.addosbreed("suse")
    expected = "{\"breeds\": {\"suse\": {}}"

    # Act
    os_signatures.exportsignatures(ExportTypes.FILE, testpath)
    with open(testpath, "r") as f:
        result = f.read()

    # Assert
    assert expected == result
Beispiel #2
0
def test_exportsignatures_string():
    # Arrange
    os_signatures = Signatures()
    os_signatures.addosbreed("suse")
    expected = "{\"breeds\": {\"suse\": {}}"

    # Act
    result = os_signatures.exportsignatures(ExportTypes.STRING)

    # Assert
    assert expected == result