def test_status_page_ignores_partial_worker(self): # Be sure a worker that has not fully started up # isn't on status page w = Worker() w.last_heartbeat = None w.is_alive = True w.save() r = self.client.get(reverse('system.status')) eq_(r.status_code, 200) eq_(list(r.context['workers']), [])
def test_start_tests_with_partial_worker(self): ts = create_ts() token = Token.create(ts) # Be sure a worker that has not fully started up doesn't get # chosen for work: w = Worker() w.last_heartbeat = None w.is_alive = True w.save() r = self.client.post(reverse('system.start_tests'), data={'browsers': '*', 'token': token, 'name': ts.slug}) eq_(r.status_code, 500) data = json.loads(r.content) eq_(data['error'], True) eq_(data['message'], "No workers for u'*' are connected")
def test_start_tests_with_partial_worker(self): ts = create_ts() token = Token.create(ts) # Be sure a worker that has not fully started up doesn't get # chosen for work: w = Worker() w.last_heartbeat = None w.is_alive = True w.save() r = self.client.post(reverse('system.start_tests'), data={ 'browsers': '*', 'token': token, 'name': ts.slug }) eq_(r.status_code, 500) data = json.loads(r.content) eq_(data['error'], True) eq_(data['message'], "No workers for u'*' are connected")