def setUp(self):
        super(WhenTestingPreferredCARepo, self).setUp()
        self.ca_repo = repositories.CertificateAuthorityRepo()
        self.preferred_ca_repo = (
            repositories.PreferredCertificateAuthorityRepo())

        expiration = (datetime.datetime.utcnow() +
                      datetime.timedelta(minutes=10))

        expiration_later = (datetime.datetime.utcnow() +
                            datetime.timedelta(days=10))
        self.parsed_ca = {
            'plugin_name': 'dogtag_plugin',
            'plugin_ca_id': 'ca_master',
            'expiration': expiration.isoformat(),
            'name': 'Dogtag CA',
            'description': 'Master CA for Dogtag plugin',
            'ca_signing_certificate': 'XXXXX',
            'intermediates': 'YYYYY'
        }

        self.parsed_ca2 = {
            'plugin_name': 'symantec_plugin',
            'plugin_ca_id': 'ca_master_2',
            'expiration': expiration.isoformat(),
            'name': 'Symantec CA2',
            'description': 'Master CA for Dogtag plugin2',
            'ca_signing_certificate': 'XXXXX',
            'intermediates': 'YYYYY'
        }

        self.parsed_modified_ca = {
            'plugin_name': 'dogtag_plugin',
            'plugin_ca_id': 'ca_master',
            'expiration': expiration_later.isoformat(),
            'name': 'Dogtag CA',
            'description': 'Updated Master CA for Dogtag plugin',
            'ca_signing_certificate': 'XXXXX-updated-XXXXX',
            'intermediates': 'YYYYY'
        }

        self.global_project = res.get_or_create_global_preferred_project()
 def setUp(self):
     super(WhenTestingCertificateAuthorityRepo, self).setUp()
     self.ca_repo = repositories.CertificateAuthorityRepo()
     expiration = (datetime.datetime.utcnow() +
                   datetime.timedelta(minutes=10))
     self.parsed_ca = {
         'plugin_name': 'dogtag_plugin',
         'plugin_ca_id': 'ca_master',
         'name': 'Dogtag CA',
         'expiration': expiration.isoformat(),
         'description': 'Master CA for Dogtag plugin',
         'ca_signing_certificate': 'XXXXX',
         'intermediates': 'YYYYY'
     }
     self.parsed_ca2 = {
         'plugin_name': 'symantec_plugin',
         'plugin_ca_id': 'ca_master_2',
         'name': 'Symantec CA2',
         'expiration': expiration.isoformat(),
         'description': 'Master CA for Dogtag plugin2',
         'ca_signing_certificate': 'XXXXX',
         'intermediates': 'YYYYY'
     }