def test_status_missing_pending_count_property(status_dict):
    with pytest.raises(ValidationError) as excinfo:
        status_dict.pop("pending_count")
        Status("https://example.com/api1/status/12345678-1234-1234-1234-123456789012/",
               user="******", password="******", verify=False,
               status_info=status_dict)

    assert "No 'pending_count' in Status for request 'https://example.com/api1/status/12345678-1234-1234-1234-123456789012/'" == str(excinfo.value)
def test_status_raw(status_dict):
    """Test Status object created directly (not obtained via ApiRoot),
    and _raw property."""
    set_status_response()
    status = Status(STATUS_URL)
    assert status_dict == status._raw
def test_status_with_custom_properties(status_dict):
    status_dict["x_example_com"] = "some value"
    status_obj = Status(url=COLLECTION_URL, status_info=status_dict)
    assert len(status_obj.custom_properties) == 1
    assert status_obj.custom_properties["x_example_com"] == "some value"