'Check the latest history entry.
Arguments:
country_rules (list): List of rules, each of which are tuples
of the form `(country_code, rule_type)`.
Keyword Arguments:
enroll_msg (str): The expected enrollment message key.
access_msg (str): The expected access message key.
Raises:
AssertionError'

def _assert_history(self, country_rules, enroll_msg='default', access_msg='default'):

    record = CourseAccessRuleHistory.objects.latest()
    self.assertEqual(record.course_key, self.course_key)
    snapshot = json.loads(record.snapshot)
    self.assertEqual(snapshot['enroll_msg'], enroll_msg)
    self.assertEqual(snapshot['access_msg'], access_msg)
    for (country, rule_type) in country_rules:
        self.assertIn({'country': country, 'rule_type': rule_type}, snapshot['country_rules'])
    self.assertEqual(len(snapshot['country_rules']), len(country_rules))
