[jhbuild] Add get() method to PackageDB mock class
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] Add get() method to PackageDB mock class
- Date: Sat, 8 Oct 2011 14:38:38 +0000 (UTC)
commit c277b3fe56c8a0ef3a733858ba9ea30867512fbc
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Sat Oct 8 10:37:51 2011 -0400
Add get() method to PackageDB mock class
tests/mock.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/mock.py b/tests/mock.py
index 7039434..c141c27 100644
--- a/tests/mock.py
+++ b/tests/mock.py
@@ -100,6 +100,9 @@ class PackageDB:
return None
return entry.metadata['installed-date']
+ def get(self, package):
+ '''Return entry if package is installed, otherwise return None.'''
+ return self.entries.get(package)
class BuildScript(jhbuild.frontends.buildscript.BuildScript):
execute_is_failure = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]