def test_remove_function_from_trace_with_mangled_name(self): setup = Setup() setup._setup = dummy_setup() setup.setup_function_to_trace('app1', 'func1') setup.remove_function_from_trace('app1', 'mangledfunc1') self.assertEqual(setup._setup, dummy_setup())
def test_remove_function_from_trace_with_mangled_name(self, get_offset_for_function): setup = Setup() setup._setup = dummy_setup() setup.setup_function_to_trace('app1', 'func1') setup.remove_function_from_trace('app1', 'mangledfunc1') expected_setup = dummy_setup() expected_setup['app1']['func1']['offset'] = 8 self.assertEqual(setup._setup, expected_setup)
def test_remove_function_from_trace_raises_error_if_function_not_exists( self): setup = Setup() setup._setup = dummy_setup() with self.assertRaises(FunctionNotInBinaryError): setup.remove_function_from_trace('app1', 'func4')