def test_check(self):
        for tc in self.TEST_CASES:
            check, instances = get_check('supervisord', tc['yaml'])
            self.assertTrue(check is not None, msg=check)
            self.assertEquals(tc['expected_instances'], instances)
            for instance in instances:
                name = instance['name']

                try:
                    # Run the check
                    check.check(instance)
                except Exception, e:
                    if 'error_message' in tc:  # excepted error
                        self.assertEquals(str(e), tc['error_message'])
                    else:
                        self.assertTrue(False, msg=str(e))
                else:
                    # Assert that the check collected the right metrics
                    expected_metrics = tc['expected_metrics'][name]
                    self.assert_metrics(expected_metrics, check.get_metrics())

                    # Assert that the check generated the right service checks
                    expected_service_checks = tc['expected_service_checks'][name]
                    self.assert_service_checks(expected_service_checks,
                                               check.get_service_checks())

    # Unit Tests ###########################################################
Verify that route is called with right arguments when a blueprint is
dataset/ETHPy150Open serverdensity/sd-agent/tests/checks/mock/test_supervisord.py/TestSupervisordCheck.test_check--crossover with--dataset/ETHPy150Open gwongz/flask-apiblueprint/test_apiblueprint.py/TestAPIBlueprint.test_route