'Test that api methods on the data object called with bad kwargs return
a meaningful TypeError that we create, rather than an unhelpful cython
error'

@parameterized.expand([('history', call_with_bad_kwargs_history), ('current', call_with_bad_kwargs_current)])
def test_bad_kwargs(self, name, algo_text):

    with self.assertRaises(TypeError) as cm:
        test_algo = TradingAlgorithm(script=algo_text, sim_params=self.sim_params, env=self.env)
        test_algo.run(self.data_portal)
    self.assertEqual(("%s()    got    an    unexpected    keyword    argument    'blahblah'" % name), cm.exception.args[0])
