summaryrefslogtreecommitdiffhomepage
path: root/tests/component
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-08-02 01:32:37 -0300
committerGuido Günther <agx@sigxcpu.org>2017-08-02 10:35:05 -0300
commitdd2093b111bdf069cc989952ac7e8c3781c948cc (patch)
tree5c44ff7ba79979e6060a6b9d70cd038e4c572d00 /tests/component
parentfd25d50088f5ca231195123fd511f491ebbb96e2 (diff)
test_buildpackage_rpm: correctly mock False state
This way we don't need to rely on python comparing our tristate to True / False correctly.
Diffstat (limited to 'tests/component')
-rw-r--r--tests/component/rpm/test_buildpackage_rpm.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/component/rpm/test_buildpackage_rpm.py b/tests/component/rpm/test_buildpackage_rpm.py
index 4193e1d7..e236cf45 100644
--- a/tests/component/rpm/test_buildpackage_rpm.py
+++ b/tests/component/rpm/test_buildpackage_rpm.py
@@ -54,12 +54,15 @@ def mock_gbp(args):
def mock_notify(summary, message, notify_opt):
"""Mock notification system"""
+ if notify_opt.is_off():
+ return True
# Auto will succeed
- if notify_opt.is_auto():
+ elif notify_opt.is_auto():
MOCK_NOTIFICATIONS.append((summary, message))
return True
# Otherwise fail
- return False
+ else:
+ return False
class TestGbpRpm(RpmRepoTestBase):