Skip to content

Commit

Permalink
[webkitbugspy] Surpress login errors in unit tests
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=258817
rdar://111696020

Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitbugspy/webkitbugspy/tests/radar_unittest.py:
(TestRadar.test_encoding): Surpress loging errors.
(TestRadar.test_decoding): Ditto.

Canonical link: https://commits.webkit.org/276780@main
  • Loading branch information
JonWBedard committed Mar 28, 2024
1 parent 17e0932 commit 664d22e
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@

class TestRadar(unittest.TestCase):
def test_encoding(self):
self.assertEqual(
radar.Tracker.Encoder().default(radar.Tracker(project='WebKit')),
dict(hide_title=True, type='radar', projects=['WebKit']),
)
with OutputCapture():
self.assertEqual(
radar.Tracker.Encoder().default(radar.Tracker(project='WebKit')),
dict(hide_title=True, type='radar', projects=['WebKit']),
)

def test_decoding(self):
decoded = Tracker.from_json(json.dumps(radar.Tracker(), cls=Tracker.Encoder))
self.assertIsInstance(decoded, radar.Tracker)
self.assertEqual(decoded.from_string('rdar://1234').id, 1234)
with OutputCapture():
decoded = Tracker.from_json(json.dumps(radar.Tracker(), cls=Tracker.Encoder))
self.assertIsInstance(decoded, radar.Tracker)
self.assertEqual(decoded.from_string('rdar://1234').id, 1234)

def test_no_radar(self):
with mocks.NoRadar():
Expand Down

0 comments on commit 664d22e

Please sign in to comment.