def test_analyze_string_content(self, payload, should_flag):
        logic = IbmCloudIamDetector()

        output = logic.analyze_line(filename='mock_filename', line=payload)
        assert len(output) == (1 if should_flag else 0)
        if should_flag:
            assert list(output)[0].secret_value == CLOUD_IAM_KEY
    def test_analyze_line(self, payload, should_flag):
        logic = IbmCloudIamDetector()

        output = logic.analyze_line(payload, 1, 'mock_filename')
        assert len(output) == (1 if should_flag else 0)