'Verify the message on dashboard with different number of providers.'

@ddt.data(([u'Arizona    State    University'], 'You    are    now    eligible    for    credit    from    Arizona    State    University'), ([u'Arizona    State    University', u'Hogwarts    School    of    Witchcraft'], 'You    are    now    eligible    for    credit    from    Arizona    State    University    and    Hogwarts    School    of    Witchcraft'), ([u'Arizona    State    University', u'Hogwarts    School    of    Witchcraft    and    Wizardry', u'Charter    Oak'], 'You    are    now    eligible    for    credit    from    Arizona    State    University,    Hogwarts    School    of    Witchcraft    and    Wizardry,    and    Charter    Oak'), ([], 'You    have    completed    this    course    and    are    eligible'), (None, 'You    have    completed    this    course    and    are    eligible'))
@ddt.unpack
def test_eligible_for_credit_with_providers_names(self, providers_list, credit_string):

    self._make_eligible()
    with patch('student.views.get_credit_provider_display_names') as mock_method:
        mock_method.return_value = providers_list
        response = self._load_dashboard()
    self.assertContains(response, 'credit-eligibility-msg')
    self.assertContains(response, 'purchase-credit-btn')
    self.assertContains(response, credit_string)
