changeset 16:aff78060802d

made MockBugzillaApi better
author Atul Varma <avarma@mozilla.com>
date Tue, 13 Apr 2010 19:02:45 -0700
parents 798f8f33c418
children a6b33ad7db1d
files test_bugzilla.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test_bugzilla.py	Tue Apr 13 19:00:11 2010 -0700
+++ b/test_bugzilla.py	Tue Apr 13 19:02:45 2010 -0700
@@ -59,12 +59,13 @@
     u'id': u'558680'
     }
 
-class MockBugzillaApi(object):
+class MockBugzillaApi(bugzilla.BugzillaApi):
     def __init__(self):
+        bugzilla.BugzillaApi.__init__(self,
+                                      config=Mock('config'),
+                                      jsonreq=Mock('jsonreq'),
+                                      getpass=Mock('getpass'))
         self.request = Mock('bzapi.request')
-        self.users = bugzilla.LazyMapping(self, bugzilla.User, keytype=unicode)
-        self.attachments = bugzilla.LazyMapping(self, bugzilla.Attachment, keytype=int)
-        self.bugs = bugzilla.LazyMapping(self, bugzilla.Bug, keytype=int)
 
 DOCTEST_EXTRA_GLOBS = {
     'Mock': Mock,