@patch('nefertari.view.BaseView._run_init_actions')
    def test_add_before_or_after_before(self, run):
        request = self.get_common_mock_request()
        view = DummyBaseView(
            context={}, request=request, _query_params={'foo': 'bar'})
        callable_ = lambda x: x
        view.add_before_or_after_call(
            action='foo', _callable=callable_, pos=None, before=True)
        assert callable_ in view._before_calls['foo']
dataset/ETHPy150Open ramses-tech/nefertari/tests/test_view.py/TestBaseView.test_add_before_or_after_before/original