Exemple #1
0
    def setUp(self):
        self.u = User.objects.create_user("test_user", "*****@*****.**",
                                          "password")

        self.cert_fname = get_user_cert_fname(self.u)
        self.key_fname = get_user_key_fname(self.u)

        try_unlink(self.cert_fname)
        try_unlink(self.key_fname)
 def setUp(self):
     self.u = User.objects.create_user(
         "test_user", "*****@*****.**", "password")
     
     self.cert_fname = get_user_cert_fname(self.u)
     self.key_fname = get_user_key_fname(self.u)
     
     try_unlink(self.cert_fname)
     try_unlink(self.key_fname)
Exemple #3
0
 def save(self, user):
     """Write the key and cert into files.
     
     @param user: the user to save the cert and key for.
     @type user: C{django.contrib.auth.models.User}
     """
     
     key_fname = get_user_key_fname(user)
     cert_fname = get_user_cert_fname(user)
     
     self.key.save_to_file(key_fname)
     self.cert.save_to_file(cert_fname)
Exemple #4
0
 def get_user_client(self, user):
     """Get a client to talk to the aggregate as the user."""
     return self._get_client(get_user_cert_fname(user),
                             get_user_key_fname(user))
 def get_user_client(self, user):
     """Get a client to talk to the aggregate as the user."""
     return self._get_client(
         get_user_cert_fname(user), get_user_key_fname(user))