def setUp(self): super(UserManagerTests, self).setUp() # Hardcoded to /var/lib/pulp, so change here to avoid permissions issues self.default_sn_path = SerialNumber.PATH SerialNumber.PATH = '/tmp/sn.dat' sn = SerialNumber() sn.reset() self.manager = UserManager()
# There is NO WARRANTY for this software, express or implied, # including the implied warranties of MERCHANTABILITY, # NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should # have received a copy of GPLv2 along with this software; if not, see # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. # import logging import unittest from pulp.server.auth.certificate import Certificate from pulp.server.auth.cert_generator import SerialNumber import pulp.server.auth.cert_generator as cert_generator SerialNumber.PATH = '/tmp/sn.dat' sn = SerialNumber() sn.reset() # The following certificate was signed by the pulp CA # (<code root>/etc/pki/pulp/ca.crt) VALID_CERT = ''' -----BEGIN CERTIFICATE----- MIID2jCCAsICAQEwDQYJKoZIhvcNAQEFBQAwFDESMBAGA1UEAxMJbG9jYWxob3N0 MB4XDTEwMDgyNTEyNTkzNVoXDTExMDgyNTEyNTkzNVowUjELMAkGA1UEBhMCVVMx CzAJBgNVBAgMAk5DMRAwDgYDVQQHDAdSYWxlaWdoMRAwDgYDVQQKDAdSZWQgSGF0 MRIwEAYDVQQDDAlsb2NhbGhvc3QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK AoICAQChxWk1A/0zpGOctuo7XDbTsguEYEnmbw2dcr9EmZ0ntUYr0Jr5nsbpIL0l fyTrgKySqr8ebDc6srnkbjl4kXi7nBC58CTonqVHlqtxGFHScnoK2OAsR4K+xGEP 3zJ/ciJ4XRH9++p5PH3oNIFMru8+NONyL8BuoydI8t4afpTIIFwGP2mGRn4o8LAS Mq8yQCAa8toriZ/0BK3lA0Sa+A4a5EF67v6vGnVcCDKSWIeB3SpSMCmv5CiYZjrN