def _test_update_change_generation_without_caa(self, certificate_arn):
     properties = self.test_properties()
     cert_proc = dc.CertificateProcessor(certificate_arn, properties)
     changes = cert_proc.generate_create_caa_records_changes()
     self.assertEqual(2, len(changes))
     for domain in TEST_DOMAINS:
         self.assertFalse(has_cname_record(changes, domain), 'cname for {}'.format(domain))
         self.assertTrue(has_caa_record(changes, domain), 'missing caa for {}'.format(domain))
 def _test_dns_records_deletion_stardard(self, certificate_arn):
     properties = self.test_properties()
     cert_proc = dc.CertificateProcessor(certificate_arn, properties)
     try:
         cert_proc.create_record_set_group()
     except Exception as e:
         self.fail(str(e))
     else:
         cert_proc.delete_record_set_group()
 def test_integration(self):
     properties = self.test_properties()
     cert_proc = dc.CertificateProcessor(None, properties)
     try:
         certificate_arn = cert_proc.create_certificate()
         for sub_test in [getattr(self, m) for m in dir(self) if m.startswith('_test_')]:
             sub_test(certificate_arn)
     finally:
         cert_proc.delete_certificate()
         pass
 def _test_dns_records_deletion_failover(self, certificate_arn):
     properties = self.test_properties()
     cert_proc = dc.CertificateProcessor(certificate_arn, properties)
     try:
         cert_proc.create_record_set_group()
     except Exception as e:
         self.fail(str(e))
     else:
         try:
             changes = cert_proc.generate_delete_record_set_group_changes()
             cert_proc.execute_delete_changes(changes[0:1])
         except Exception as e:
             self.fail(str(e))
         else:
             cert_proc.delete_record_set_group()
 def _test_dns_records_deletion_faulty(self, certificate_arn):
     properties = self.test_properties()
     cert_proc = dc.CertificateProcessor(certificate_arn, properties)
     cert_proc.delete_record_set_group()