'Test that with show_correctness="past_due", correctness will only be visible
after the problem is closed for everyone--e.g. after due date + grace period.'

@ddt.data(({'show_correctness': 'past_due', 'max_attempts': '1', 'attempts': '1', 'due': 'tomorrow_str'}, False), ({'show_correctness': 'past_due', 'max_attempts': '1', 'attempts': '0', 'due': 'yesterday_str'}, True), ({'show_correctness': 'past_due', 'max_attempts': '1', 'attempts': '0', 'due': 'tomorrow_str'}, False), ({'show_correctness': 'past_due', 'max_attempts': '1', 'attempts': '1', 'due': 'yesterday_str', 'graceperiod': 'two_day_delta_str'}, False))
@ddt.unpack
def test_show_correctness_past_due(self, problem_data, expected_result):

    problem_data['due'] = getattr(self, problem_data['due'])
    if ('graceperiod' in problem_data):
        problem_data['graceperiod'] = getattr(self, problem_data['graceperiod'])
    problem = CapaFactory.create(**problem_data)
    self.assertEqual(problem.correctness_available(), expected_result)
