def test_basic(self): svcname = 'test_basic' self.assertEquals(True, spool.status(svcname)[0]) spool.down(svcname) self.assertEquals(False, spool.status(svcname)[0]) self.assertEquals(False, spool.is_up(svcname)[0]) spool.up(svcname) self.assertEquals(True, spool.status(svcname)[0])
def test_status_creation(self): now = 1000 svcname = 'test_status_creation' with mock.patch('time.time', return_value=now): spool.down(svcname) up, info_dict = spool.status(svcname) spool.up(svcname) self.assertEqual(info_dict['creation'], 1000)
def test_basic(self): svcname = 'test_basic' self.assertEquals(True, spool.status(svcname)[0]) self.assertEquals(True, spool.status(svcname, 1234)[0]) self.assertEquals(True, spool.status(svcname, 1234, '10.93.10.1')[0]) spool.down(svcname, port=1234) self.assertEquals(True, spool.status(svcname)[0]) self.assertEquals(False, spool.status(svcname, 1234)[0]) self.assertEquals(True, spool.status(svcname, 1234, '10.93.10.1')[0]) spool.down(svcname) self.assertEquals(False, spool.status(svcname)[0]) self.assertEquals(False, spool.is_up(svcname)[0]) self.assertEquals(False, spool.is_up(svcname, 1234, '10.93.10.1')[0]) spool.up(svcname, port=1234) self.assertEquals(True, spool.status(svcname, 1234)[0]) spool.up(svcname, port=1234, host='10.93.10.1') self.assertEquals(True, spool.status(svcname, 1234, '10.93.10.1')[0]) spool.up(svcname) self.assertEquals(True, spool.status(svcname)[0])
def test_repeated_ups_works(self): spool.up('all') spool.up('all')