From b5d1614c4822febe01e14576122bffa8718a20ed Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 11 Jun 2018 12:41:55 +0200 Subject: [PATCH] Add audio attribute to FakeWebTab --- tests/helpers/stubs.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/helpers/stubs.py b/tests/helpers/stubs.py index 545b32fb4..84e5b0125 100644 --- a/tests/helpers/stubs.py +++ b/tests/helpers/stubs.py @@ -232,6 +232,15 @@ class FakeWebTabHistory(browsertab.AbstractHistory): return self._can_go_forward +class FakeWebTabAudio(browsertab.AbstractAudio): + + def is_muted(self): + return False + + def is_recently_audible(self): + return False + + class FakeWebTab(browsertab.AbstractTab): """Fake AbstractTab to use in tests.""" @@ -248,6 +257,7 @@ class FakeWebTab(browsertab.AbstractTab): self.history = FakeWebTabHistory(self, can_go_back=can_go_back, can_go_forward=can_go_forward) self.scroller = FakeWebTabScroller(self, scroll_pos_perc) + self.audio = FakeWebTabAudio() wrapped = QWidget() self._layout.wrap(self, wrapped)