'The point of this test is to make sure that the exact randomization
per seed does not change.'

def test_answer_pool_random_consistent(self):

    xml_str = textwrap.dedent('\n                                                <problem>\n                                                <multiplechoiceresponse>\n                                                        <choicegroup    type="MultipleChoice"    answer-pool="2">\n                                                                <choice    correct="false">wrong-1</choice>\n                                                                <choice    correct="false">wrong-2</choice>\n                                                                <choice    correct="true">correct-1</choice>\n                                                                <choice    correct="false">wrong-3</choice>\n                                                                <choice    correct="false">wrong-4</choice>\n                                                                <choice    correct="true">correct-2</choice>\n                                                                <choice    correct="true">correct-3</choice>\n                                                        </choicegroup>\n                                                </multiplechoiceresponse>\n\n                                                <multiplechoiceresponse>\n                                                        <choicegroup    type="MultipleChoice"    answer-pool="3">\n                                                                <choice    correct="false">wrong-1</choice>\n                                                                <choice    correct="false">wrong-2</choice>\n                                                                <choice    correct="true">correct-1</choice>\n                                                                <choice    correct="false">wrong-3</choice>\n                                                                <choice    correct="false">wrong-4</choice>\n                                                                <choice    correct="true">correct-2</choice>\n                                                                <choice    correct="true">correct-3</choice>\n                                                        </choicegroup>\n                                                </multiplechoiceresponse>\n\n                                                <multiplechoiceresponse>\n                                                        <choicegroup    type="MultipleChoice"    answer-pool="2">\n                                                                <choice    correct="false">wrong-1</choice>\n                                                                <choice    correct="false">wrong-2</choice>\n                                                                <choice    correct="true">correct-1</choice>\n                                                                <choice    correct="false">wrong-3</choice>\n                                                                <choice    correct="false">wrong-4</choice>\n                                                                <choice    correct="true">correct-2</choice>\n                                                                <choice    correct="true">correct-3</choice>\n                                                        </choicegroup>\n                                                </multiplechoiceresponse>\n\n                                                <multiplechoiceresponse>\n                                                        <choicegroup    type="MultipleChoice"    answer-pool="3">\n                                                                <choice    correct="false">wrong-1</choice>\n                                                                <choice    correct="false">wrong-2</choice>\n                                                                <choice    correct="true">correct-1</choice>\n                                                                <choice    correct="false">wrong-3</choice>\n                                                                <choice    correct="false">wrong-4</choice>\n                                                                <choice    correct="true">correct-2</choice>\n                                                                <choice    correct="true">correct-3</choice>\n                                                        </choicegroup>\n                                                </multiplechoiceresponse>\n                                </problem>\n                                ')
    problem = new_loncapa_problem(xml_str)
    the_html = problem.get_html()
    str1 = ((("<div>.*\\[.*'correct-2'.*'wrong-2'.*\\].*</div>.*" + "<div>.*\\[.*'wrong-1'.*'correct-2'.*'wrong-4'.*\\].*</div>.*") + "<div>.*\\[.*'correct-1'.*'wrong-4'.*\\].*</div>.*") + "<div>.*\\[.*'wrong-1'.*'wrong-2'.*'correct-1'.*\\].*</div>")
    without_new_lines = the_html.replace('\n', '')
    self.assertRegexpMatches(without_new_lines, str1)
