'Assert that the symbolic response has a certain grade.
`problem` is the capa problem containing the symbolic response.
`student_input` is the text the student entered.
`dynamath_input` is the JavaScript rendered MathML from the page.
`expected_correctness` is either "correct" or "incorrect"
`snuggletex_resp` is the simulated response from the Snuggletex server'

def _assert_symbolic_grade(self, problem, student_input, dynamath_input, expected_correctness, snuggletex_resp=''):

    input_dict = {'1_2_1': str(student_input), '1_2_1_dynamath': str(dynamath_input)}
    with mock.patch.object(requests, 'post') as mock_post:
        mock_post.return_value.text = snuggletex_resp
        correct_map = problem.grade_answers(input_dict)
        self.assertEqual(correct_map.get_correctness('1_2_1'), expected_correctness)
