Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: cros_mark_as_stable_unittest.py

Issue 4449001: Add 0.0.1 logic to new cros_mark. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cros_mark_as_stable.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cros_mark_as_stable_unittest.py
diff --git a/cros_mark_as_stable_unittest.py b/cros_mark_as_stable_unittest.py
index 73985ae4d2c453229a0beeba588bcfffe7bef677..e7fd3317b20939426cc89d15b4851d7f43daae0f 100755
--- a/cros_mark_as_stable_unittest.py
+++ b/cros_mark_as_stable_unittest.py
@@ -125,7 +125,7 @@ class EBuildTest(mox.MoxTestBase):
def testParseEBuildPathNoRevisionNumber(self):
# Test with ebuild without revision number.
no_rev, no_version, revision = cros_mark_as_stable._EBuild._ParseEBuildPath(
- '/path/test_package-0.0.1.ebuild')
+ '/path/test_package-9999.ebuild')
self.assertEquals(no_rev, '/path/test_package-0.0.1')
self.assertEquals(no_version, '/path/test_package')
self.assertEquals(revision, 0)
@@ -139,6 +139,7 @@ class EBuildStableMarkerTest(mox.MoxTestBase):
self.mox.StubOutWithMock(cros_mark_as_stable, 'RunCommand')
self.mox.StubOutWithMock(os, 'unlink')
self.m_ebuild = self.mox.CreateMock(cros_mark_as_stable._EBuild)
+ self.m_ebuild.is_stable = True
self.m_ebuild.package = 'test_package'
self.m_ebuild.current_revision = 1
self.m_ebuild.ebuild_path_no_revision = '/path/test_package-0.0.1'
@@ -281,13 +282,13 @@ class BuildEBuildDictionaryTest(mox.MoxTestBase):
self.package_path = self.root + '/test_package-0.0.1.ebuild'
paths = [[self.root, [], []]]
cros_mark_as_stable.os.walk("/overlay").AndReturn(paths)
- self.mox.StubOutWithMock(cros_mark_as_stable, '_FindStableEBuilds')
+ self.mox.StubOutWithMock(cros_mark_as_stable, '_FindUprevCandidates')
def testWantedPackage(self):
overlays = {"/overlay": []}
package = _Package(self.package)
- cros_mark_as_stable._FindStableEBuilds([]).AndReturn(package)
+ cros_mark_as_stable._FindUprevCandidates([]).AndReturn(package)
self.mox.ReplayAll()
cros_mark_as_stable._BuildEBuildDictionary(overlays, False, [self.package])
self.mox.VerifyAll()
@@ -297,7 +298,7 @@ class BuildEBuildDictionaryTest(mox.MoxTestBase):
def testUnwantedPackage(self):
overlays = {"/overlay": []}
package = _Package(self.package)
- cros_mark_as_stable._FindStableEBuilds([]).AndReturn(package)
+ cros_mark_as_stable._FindUprevCandidates([]).AndReturn(package)
self.mox.ReplayAll()
cros_mark_as_stable._BuildEBuildDictionary(overlays, False, [])
self.assertEquals(len(overlays), 1)
« no previous file with comments | « cros_mark_as_stable.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698