[csw-devel] SF.net SVN: gar:[19791] csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sat Dec 1 01:41:20 CET 2012
Revision: 19791
http://gar.svn.sourceforge.net/gar/?rev=19791&view=rev
Author: wahwah
Date: 2012-12-01 00:41:20 +0000 (Sat, 01 Dec 2012)
Log Message:
-----------
csw-upload-pkg: Unit test fix
RestClient uses credentials.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py
Modified: csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py 2012-11-30 18:19:53 UTC (rev 19790)
+++ csw/mgar/gar/v2/lib/python/csw_upload_pkg_test.py 2012-12-01 00:41:20 UTC (rev 19791)
@@ -98,7 +98,7 @@
def test_MatchSrv4ToCatalogsSame(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(GDB_STRUCT_9)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -121,7 +121,7 @@
def test_MatchSrv4ToCatalogsDifferent(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(GDB_STRUCT_9)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -144,7 +144,7 @@
# uploading a 5.10 package.
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.10', 'gdb').AndReturn(GDB_STRUCT_9)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -164,7 +164,7 @@
def test_MatchSrv4ToCatalogsSameSpecificOsrel(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(GDB_STRUCT_9)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -185,7 +185,7 @@
def test_MatchSrv4ToCatalogsAbsentFromAll(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(None)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -208,7 +208,7 @@
def test_MatchSrv4ToCatalogsSameSpecificOsrelAlreadyPresent(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(GDB_STRUCT_9)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -229,7 +229,7 @@
def test_MatchSrv4ToCatalogsNotPresent(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(GDB_STRUCT_9)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -250,7 +250,7 @@
def test_MatchSrv4ToCatalogsFirstNotPresent(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(None)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -271,7 +271,7 @@
def test_MatchSrv4ToCatalogsSolaris8(self):
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
rest_client_mock.Srv4ByCatalogAndCatalogname(
'unstable', 'sparc', u'SunOS5.9', 'gdb').AndReturn(GDB_STRUCT_8)
rest_client_mock.Srv4ByCatalogAndCatalogname(
@@ -340,7 +340,7 @@
}
rest_client_mock = self.mox.CreateMock(rest.RestClient)
self.mox.StubOutWithMock(rest, "RestClient")
- rest.RestClient(None).AndReturn(rest_client_mock)
+ rest.RestClient(None, username=None, password=None).AndReturn(rest_client_mock)
for i, os_n in enumerate(in_catalog, 3 - len(in_catalog)):
pkg_struct = pkg_struct_map[os_n]
rest_client_mock.Srv4ByCatalogAndCatalogname(
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