コード例 #1
0
ファイル: test_build_status.py プロジェクト: arcan1s/ahriman
def test_build_status_ne_by_status(build_status_failed: BuildStatus) -> None:
    """
    must be not equal by status
    """
    other = BuildStatus.from_json(build_status_failed.view())
    other.status = BuildStatusEnum.Success
    assert build_status_failed != other
コード例 #2
0
ファイル: test_build_status.py プロジェクト: arcan1s/ahriman
def test_build_status_ne_by_timestamp(
        build_status_failed: BuildStatus) -> None:
    """
    must be not equal by timestamp
    """
    other = BuildStatus.from_json(build_status_failed.view())
    other.timestamp = datetime.datetime.utcnow().timestamp()
    assert build_status_failed != other
コード例 #3
0
ファイル: test_build_status.py プロジェクト: arcan1s/ahriman
def test_build_status_eq(build_status_failed: BuildStatus) -> None:
    """
    must be equal
    """
    other = BuildStatus.from_json(build_status_failed.view())
    assert other == build_status_failed
コード例 #4
0
ファイル: test_build_status.py プロジェクト: arcan1s/ahriman
def test_build_status_from_json_view(build_status_failed: BuildStatus) -> None:
    """
    must construct same object from json
    """
    assert BuildStatus.from_json(
        build_status_failed.view()) == build_status_failed