Lines Matching refs:mock_lumpy1
77 mock_lumpy1 = mock.Mock(spec=machine_manager.CrosMachine) variable in MachineManagerTest
95 self.mock_lumpy1.name = 'lumpy1'
101 self.mock_lumpy1.machine_checksum = 'lumpy123'
107 self.mock_lumpy1.checksum_string = 'lumpy_checksum_str'
113 self.mock_lumpy1.cpuinfo = 'lumpy_cpu_info'
121 self.mm._all_machines.append(self.mock_lumpy1)
174 machine = self.mock_lumpy1
256 self.mm._TryToLockMachine(self.mock_lumpy1)
258 self.assertEqual(self.mm._machines[0], self.mock_lumpy1)
259 self.assertEqual(self.mock_lumpy1.checksum, 'false_lock_checksum')
265 self.assertEqual(args_dict['machine'], self.mock_lumpy1.name)
295 self.mock_lumpy1.SetUpChecksumInfo = FakeSetUpChecksumInfo
328 self.mock_lumpy1.locked = True
336 self.mock_lumpy1.released_time = time.time()
344 m = self.mock_lumpy1
345 self.assertEqual(m, self.mock_lumpy1)
346 self.assertTrue(self.mock_lumpy1.locked)
353 save_locked = self.mock_lumpy1.locked
354 self.mock_lumpy1.locked = False
355 self.mock_lumpy1.checksum = None
357 self.assertEqual(m, self.mock_lumpy1)
358 self.assertTrue(self.mock_lumpy1.locked)
364 self.mock_lumpy1.locked = False
365 self.mock_lumpy1.checksum = '123'
366 self.mock_lumpy1.released_time = time.time() - 8
368 self.assertEqual(m, self.mock_lumpy1)
369 self.assertTrue(self.mock_lumpy1.locked)
376 self.mock_lumpy1.locked = save_locked
377 self.mock_lumpy1.checksum = '123'
391 [self.mock_lumpy1, self.mock_lumpy2, self.mock_lumpy3])
403 [self.mock_lumpy1, self.mock_lumpy2, self.mock_lumpy3])
407 self.mm._machines = [self.mock_lumpy1, self.mock_daisy2]
409 self.mock_lumpy1.locked = True
412 self.assertTrue(self.mock_lumpy1.locked)
413 self.mm.ReleaseMachine(self.mock_lumpy1)
414 self.assertFalse(self.mock_lumpy1.locked)
415 self.assertEqual(self.mock_lumpy1.status, 'Available')
423 self.assertRaises(AssertionError, self.mm.ReleaseMachine, self.mock_lumpy1)
461 self.mock_lumpy1, self.mock_lumpy2, self.mock_lumpy3, self.mock_daisy1,
465 self.mock_lumpy1.test_run = test_run
471 self.mock_lumpy1.locked = True
477 self.mock_lumpy1.checksum = '123'