'Assert that the unenroll action is shown or not based on the cert status.'

@ddt.data(('notpassing', 1), ('restricted', 1), ('processing', 1), (None, 1), ('generating', 0), ('ready', 0))
@ddt.unpack
def test_unenroll_available(self, cert_status, unenroll_action_count):

    self.cert_status = cert_status
    with patch('student.views.cert_info', side_effect=self.mock_cert):
        response = self.client.get(reverse('dashboard'))
        self.assertEqual(pq(response.content)(self.UNENROLL_ELEMENT_ID).length, unenroll_action_count)
