def test_get_throttle_result(self): raw_crash = {'ProductName': 'Firefox', 'ReleaseChannel': 'nightly'} bsp = BreakpadSubmitterResource(self.empty_config) assert bsp.get_throttle_result(raw_crash) == (ACCEPT, 'is_nightly', 100) assert raw_crash['legacy_processing'] == ACCEPT assert raw_crash['throttle_rate'] == 100
def test_get_throttle_result(self): raw_crash = {"ProductName": "Firefox", "ReleaseChannel": "nightly"} bsp = BreakpadSubmitterResource(self.empty_config) assert bsp.get_throttle_result(raw_crash) == (ACCEPT, "is_nightly", 100) assert raw_crash["legacy_processing"] == ACCEPT assert raw_crash["throttle_rate"] == 100
def test_get_throttle_result(self): raw_crash = { 'ProductName': 'Firefox', 'ReleaseChannel': 'nightly' } bsp = BreakpadSubmitterResource(self.empty_config) assert bsp.get_throttle_result(raw_crash) == (ACCEPT, 'is_nightly', 100) assert raw_crash['legacy_processing'] == ACCEPT assert raw_crash['throttle_rate'] == 100
def test_get_throttle_result(self, data, expected, request_generator): data['ProductName'] = 'Firefox' data['Comments'] = 'foo bar baz' bsp = BreakpadSubmitterResource(self.empty_config) assert bsp.get_throttle_result(data) == expected