Skip to content

__eq__ operator raises attribute error on non-cloudevent values #171

@sasha-tkachev

Description

@sasha-tkachev

Expected Behavior

Given a non-cloudevent value will return false

Actual Behavior

raises an AttributeError

Steps to Reproduce the Problem

  1. create an event
  2. compare it to an integer
from cloudevents.http import CloudEvent

attributes = {
    "source": "test",
    "type": "google.cloud.audit.log.v1.written",
}
event = CloudEvent(attributes)
event == 1

Specifications

  • Platform: Windows
  • Python Version: Python 3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions