Exemplo n.º 1
0
    def test_predicate_no_json_dump(self):
        config = self.get_basic_config()
        processed_crash = DotDict({
            'product': 'Firefox',
            'os_name': 'Windows NT',
            'cpu_name': 'x86',
            'signature': 'EnterBaseline',
        })

        rule = JitCrashCategorizeRule(config)
        assert rule.predicate({}, {}, processed_crash, {}) is True
    def test_predicate_empty_frames(self):
        config = self.get_basic_config()
        processed_crash = DotDict({
            'product': 'Firefox',
            'os_name': 'Windows NT',
            'cpu_name': 'x86',
            'signature': 'EnterBaseline',
            'json_dump': {
                'crashing_thread': {
                    # There is a "frames" key, but nothing in the list
                    'frames': []
                }
            },
        })

        rule = JitCrashCategorizeRule(config)
        assert rule.predicate({}, {}, processed_crash, {}) is True
    def test_predicate_empty_frames(self):
        config = self.get_basic_config()
        processed_crash = DotDict({
            'product': 'Firefox',
            'os_name': 'Windows NT',
            'cpu_name': 'x86',
            'signature': 'EnterBaseline',

            'json_dump': {
                'crashing_thread': {
                    # There is a "frames" key, but nothing in the list
                    'frames': []
                }
            },
        })

        rule = JitCrashCategorizeRule(config)
        assert rule.predicate({}, {}, processed_crash, {}) is True