[csw-devel] SF.net SVN: gar:[21064] csw/mgar/gar/v2

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon May 13 19:07:10 CEST 2013


Revision: 21064
          http://gar.svn.sourceforge.net/gar/?rev=21064&view=rev
Author:   wahwah
Date:     2013-05-13 17:07:10 +0000 (Mon, 13 May 2013)
Log Message:
-----------
pkgdb: Fix generate-catalog-file's tests

Also, register the test in the central test suite so we don't miss these tests
in the future.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/generate_catalog_file_test.py
    csw/mgar/gar/v2/tests/run_tests.py

Modified: csw/mgar/gar/v2/lib/python/generate_catalog_file_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/generate_catalog_file_test.py	2013-05-13 11:44:28 UTC (rev 21063)
+++ csw/mgar/gar/v2/lib/python/generate_catalog_file_test.py	2013-05-13 17:07:10 UTC (rev 21064)
@@ -29,20 +29,19 @@
     #   bind 9.4.2,REV=2008.07.09_rev=p1 CSWbind
     #   bind-9.4.2,REV=2008.07.09_rev=p1-SunOS5.8-sparc-CSW.pkg.gz
     #   f68df57fcf54bfd37304b79d6f7eeacc 2954112 CSWcommon|CSWosslrt net none
-    cfg = generate_catalog_file.CatalogFileGenerator("dublin", "sparc", "SunOS5.10", mock_pkgcache, mock_rest)
-    mock_pkgcache.GetDeps('fdb7912713da36afcbbe52266c15cb3f').AndReturn(
-        {
-          "pkgname": "CSW389-admin-mock",
-          "deps": [
-            ["CSWfoo", ""],
-            ["CSWbar", ""],
-          ]
-        }
-    )
-    mock_pkgcache.GetPkgstats('fdb7912713da36afcbbe52266c15cb3f').AndReturn(
-        # {"i_depends": ["CSWincompatible", "CSWzorg"]}
-        {"i_depends": []}
-    )
+    cfg = generate_catalog_file.CatalogFileGenerator("dublin",
+                                                     "sparc",
+                                                     "SunOS5.10",
+                                                     mock_pkgcache, mock_rest)
+    mock_rest.GetCatalogData('fdb7912713da36afcbbe52266c15cb3f').AndReturn({
+      "deps": [
+        ["CSWfoo", ""],
+        ["CSWbar", ""],
+      ],
+      "i_deps": [],
+      "pkginfo_name": "389_admin - The 389 LDAP server Admin Tools",
+      "pkgname": "CSW389-admin-mock",
+      })
     self.mox.ReplayAll()
     self.assertEquals(
         "389_admin "

Modified: csw/mgar/gar/v2/tests/run_tests.py
===================================================================
--- csw/mgar/gar/v2/tests/run_tests.py	2013-05-13 11:44:28 UTC (rev 21063)
+++ csw/mgar/gar/v2/tests/run_tests.py	2013-05-13 17:07:10 UTC (rev 21064)
@@ -18,6 +18,7 @@
 from database_test           import *
 from dependency_checks_test  import *
 from inspective_package_test import *
+from generate_catalog_file   import *
 from ldd_emul_test           import *
 from models_test             import *
 from opencsw_test            import *

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