def _test_pki_generates_keypairs(self, sitename):
        pkigenerator = pki_generator.PKIGenerator(sitename)
        output_paths = pkigenerator.generate()

        documents = self._aggregate_documents(output_paths)
        assert 2 == len(documents)
        self._validate_keypairs(documents)

        return documents
    def _test_pki_generates_cas(self, sitename):
        pkigenerator = pki_generator.PKIGenerator(sitename)
        output_paths = pkigenerator.generate()

        documents = self._aggregate_documents(output_paths)
        assert 2 == len(documents)
        self._validate_certificate_authorities(documents)

        return documents