def test_all_processes_only_called_once(self):
        self.all_processes_called_count = 0
        def all_processes():
            self.all_processes_called_count += 1

        self.context.process_manager.all_processes = all_processes
        self.split_lines(dostatus(self.context, True))
        assert_that(self.all_processes_called_count, is_(1))
 def test_down_service_appears_in_down(self):
     result = self.split_lines(dostatus(self.context, True))
     assert_that(result, has_item("Down:"))
     assert_that(
         result,
         has_item(
             all_of(contains_string("test-service-2"),
                    contains_string("DOWN"))))
 def test_do_status_includes_header(self):
     result = self.split_lines(dostatus(self.context, False))
     assert_that(result, has_item("Running:"))
     assert_that(
         result,
         has_item(
             all_of(contains_string("name"),
                    contains_string("healthcheck"))))
    def test_all_processes_only_called_once(self):
        self.all_processes_called_count = 0

        def all_processes():
            self.all_processes_called_count += 1

        self.context.process_manager.all_processes = all_processes
        self.split_lines(dostatus(self.context, True))
        assert_that(self.all_processes_called_count, is_(1))
 def test_down_service_appears_in_down(self):
     result = self.split_lines(dostatus(self.context, True))
     assert_that(result, has_item("Down:"))
     assert_that(result, has_item(all_of(contains_string("test-service-2"), contains_string("DOWN"))))
 def test_do_status_includes_header(self):
     result = self.split_lines(dostatus(self.context, False))
     assert_that(result, has_item("Running:"))
     assert_that(result, has_item(all_of(contains_string("name"), contains_string("healthcheck"))))