Пример #1
0
    def test_constructor_with_multiple_issuers(self):
        """ Verify the Accreditor supports multiple Issuers """
        accreditor = Accreditor(issuers=[CourseCertificateIssuer(), ProgramCertificateIssuer()])

        expected = {
            self.course_credential: accreditor.issuers[0],
            self.program_credential: accreditor.issuers[1],
        }
        self.assertDictEqual(accreditor.credential_type_issuer_map, expected)
Пример #2
0
 def __init__(self, issuers=None):
     self.issuers = issuers or [
         CourseCertificateIssuer(),
         ProgramCertificateIssuer()
     ]
     self._create_credential_type_issuer_map()
Пример #3
0
class CourseCertificateIssuerTests(CertificateIssuerBase, TestCase):
    """ Tests for course Issuer class and its methods."""
    issuer = CourseCertificateIssuer()
    cert_factory = CourseCertificateFactory
    cert_type = CourseCertificate