Skip to content

Commit

Permalink
fix(tests): Fix outdated assertion (#80586)
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo authored Nov 12, 2024
1 parent 8bdd127 commit 79306ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
21 changes: 18 additions & 3 deletions tests/relay_integration/lang/javascript/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,12 @@ def test_adds_contexts_without_device(self):

event = self.post_and_retrieve_event(data)
contexts = event.interfaces["contexts"].to_json()
assert contexts.get("os") == {"name": "Windows", "version": "8", "type": "os"}
assert contexts.get("os") == {
"os": "Windows 8",
"name": "Windows",
"version": "8",
"type": "os",
}
assert contexts.get("device") is None

@requires_symbolicator
Expand All @@ -165,8 +170,18 @@ def test_adds_contexts_with_device(self):
event = self.post_and_retrieve_event(data)

contexts = event.interfaces["contexts"].to_json()
assert contexts.get("os") == {"name": "Android", "type": "os", "version": "4.3"}
assert contexts.get("browser") == {"name": "Android", "type": "browser", "version": "4.3"}
assert contexts.get("os") == {
"os": "Android 4.3",
"name": "Android",
"type": "os",
"version": "4.3",
}
assert contexts.get("browser") == {
"browser": "Android 4.3",
"name": "Android",
"type": "browser",
"version": "4.3",
}
assert contexts.get("device") == {
"family": "Samsung SCH-R530U",
"type": "device",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ contexts:
os:
build: ''
name: Windows
os: Windows 10.0.14393
type: os
version: 10.0.14393
debug_meta:
Expand Down

0 comments on commit 79306ff

Please sign in to comment.