Skip to content

Commit

Permalink
add empty os context test
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMoelans committed Nov 28, 2024
1 parent fa36fc9 commit 493be0b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/sentry/rules/conditions/test_event_attribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,16 @@ def test_os_distribution_name_and_version(self):
)
self.assertDoesNotPass(rule, event)

event["contexts"]["os"] = {} # missing distribution_name and distribution_version
rule = self.get_rule(
data={
"match": MatchType.EQUAL,
"attribute": "os.distribution_name",
"value": "ubuntu",
}
)
self.assertDoesNotPass(rule, event)

def test_unreal_crash_type(self):
event = self.get_event()
rule = self.get_rule(
Expand Down

0 comments on commit 493be0b

Please sign in to comment.