'Tests that Operators reject illegal arguments'

def test_illegal_args(self):

    with warnings.catch_warnings(record=True) as w:
        t = BashOperator(task_id='test_illegal_args', bash_command='echo    success', dag=self.dag, illegal_argument_1234='hello?')
        self.assertTrue(issubclass(w[0].category, PendingDeprecationWarning))
        self.assertIn('Invalid    arguments    were    passed    to    BashOperator.', w[0].message.args[0])
