Lines Matching refs:mox
7 import mox
107 class GetStatusTest(mox.MoxTestBase):
119 self.mox.StubOutWithMock(urllib2, 'urlopen')
120 self.mox.StubOutWithMock(time, 'sleep')
127 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
129 self.mox.ReplayAll()
131 self.mox.VerifyAll()
139 urllib2.urlopen(mox.IgnoreArg()).AndRaise(
141 time.sleep(mox.IgnoreArg()).AndReturn(None)
142 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
144 self.mox.ReplayAll()
146 self.mox.VerifyAll()
154 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
156 time.sleep(mox.IgnoreArg()).AndReturn(None)
157 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
159 self.mox.ReplayAll()
161 self.mox.VerifyAll()
170 urllib2.urlopen(mox.IgnoreArg()).AndRaise(
172 time.sleep(mox.IgnoreArg()).AndReturn(None)
173 self.mox.ReplayAll()
175 self.mox.VerifyAll()
184 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
186 time.sleep(mox.IgnoreArg()).InAnyOrder().AndReturn(None)
187 self.mox.ReplayAll()
189 self.mox.VerifyAll()
286 class CheckStatusTest(mox.MoxTestBase):
301 self.mox.StubOutWithMock(global_config.global_config,
303 self.mox.StubOutWithMock(site_utils, '_get_lab_status')
339 self.mox.ReplayAll()
342 self.mox.VerifyAll()