Ejemplo n.º 1
0
 def test_verify(self):
     exist = self.mox.CreateMockAnything()
     self.mox.StubOutWithMock(dbverifier, '_verify_for_launch')
     self.mox.StubOutWithMock(dbverifier, '_verify_for_delete')
     self.mox.StubOutWithMock(dbverifier, '_mark_exists_failed')
     self.mox.StubOutWithMock(dbverifier, '_mark_exist_verified')
     dbverifier._mark_exists_failed(exist)
     self.mox.ReplayAll()
     dbverifier._verify(exist)
     self.mox.VerifyAll()
Ejemplo n.º 2
0
 def test_verify_exception_during_delete(self):
     exist = self.mox.CreateMockAnything()
     exist.launched_at = decimal.Decimal('1.1')
     self.mox.StubOutWithMock(dbverifier, '_verify_for_launch')
     self.mox.StubOutWithMock(dbverifier, '_verify_for_delete')
     self.mox.StubOutWithMock(dbverifier, '_mark_exists_failed')
     self.mox.StubOutWithMock(dbverifier, '_mark_exist_verified')
     dbverifier._verify_for_launch(exist)
     dbverifier._verify_for_delete(exist).AndRaise(Exception())
     dbverifier._mark_exists_failed(exist)
     self.mox.ReplayAll()
     dbverifier._verify(exist)
     self.mox.VerifyAll()