'Sampling returns reason when probe fails.'

@capture_logging(None)
def test_bad_probe(self, logger):

    sampled = sample(FakeOperation(repeat(False)), FakeMetric(repeat(5)), 1)
    def replace_reason_with_type(sample):
        if ('reason' in sample):
            sample['reason'] = type(sample['reason'])
        return sample
    sampled.addCallback(replace_reason_with_type)
    self.assertEqual(self.successResultOf(sampled), {'success': False, 'reason': str})
