Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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
Exemple #4
0
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