def test_invalid_keyword_argument(self):
        # Check each of the allowed method names
        for method in SimpleView.http_method_names:
            kwargs = dict(((method, "value"),))
            with self.assertRaises(TypeError):
                SimpleView.as_view(**kwargs)

        # Check the case view argument is ok if predefined on the class...
        CustomizableView.as_view(parameter="value")
        # ...but raises errors otherwise.
        with self.assertRaises(TypeError):
            CustomizableView.as_view(foobar="value")
Test that view arguments must be predefined on the class and can't
dataset/ETHPy150Open django/django/tests/generic_views/test_base.py/ViewTest.test_invalid_keyword_argument