'Check that the correct modules are available to custom
response scripts'

def test_module_imports_function(self):

    for module_name in ['random', 'numpy', 'math', 'scipy', 'calc', 'eia', 'chemcalc', 'chemtools', 'miller', 'draganddrop']:
        script = textwrap.dedent(("\n                                                def    check_func(expect,    answer_given):\n                                                                assert('%s'    in    globals())\n                                                                return    True" % module_name))
        problem = self.build_problem(script=script, cfn='check_func')
        try:
            problem.grade_answers({'1_2_1': '42'})
        except ResponseError:
            self.fail("Could    not    use    name    '{0}s'    in    custom    response".format(module_name))
