[csw-devel] SF.net SVN: gar:[12207] csw/mgar/gar/v2/lib/python/package_checks_test.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Thu Jan 6 13:00:09 CET 2011


Revision: 12207
          http://gar.svn.sourceforge.net/gar/?rev=12207&view=rev
Author:   wahwah
Date:     2011-01-06 12:00:09 +0000 (Thu, 06 Jan 2011)

Log Message:
-----------
checkpkg: Mocks specific for indiv/set tests

Set tests need to be mocked with a different class than individual
package tests.  Also, using some mox meta magic to avoid boilerplate
code.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_checks_test.py

Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py	2011-01-06 11:58:41 UTC (rev 12206)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py	2011-01-06 12:00:09 UTC (rev 12207)
@@ -33,6 +33,8 @@
 class CheckpkgUnitTestHelper(object):
   """Wraps common components of checkpkg tests."""
 
+  __metaclass__ = mox.MoxMetaTestBase
+
   def setUp(self):
     super(CheckpkgUnitTestHelper, self).setUp()
     self.mox = mox.Mox()
@@ -60,7 +62,6 @@
                                     self.error_mgr_mock,
                                     self.logger_mock,
                                     self.messenger)
-    self.mox.VerifyAll()
 
 
 class TestMultipleDepends(CheckpkgUnitTestHelper, unittest.TestCase):


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list