Exemple #1
0
 def post(self):
     if users.is_current_user_admin():
         Keymaster.encrypt(self.request.get('key'),
                           self.request.get('secret'))
         self.response.out.write("Saved: %s" %
                                 Keymaster.decrypt(self.request.get('key')))
     else:
         self.redirect('/')
  def setUp(self):
    super(MaglockHandlerTest, self).setUp()

    # Reset user signins.
    self.user.signins = 0
    # Set rfid tag.
    self.user.rfid_tag = "1337"
    self.user.put()

    # Add the keymaster key we need.
    Keymaster.encrypt("maglock:key", "notasecret")
    def setUp(self):
        super(MaglockHandlerTest, self).setUp()

        # Reset user signins.
        self.user.signins = 0
        # Set rfid tag.
        self.user.rfid_tag = "1337"
        self.user.put()

        # Add the keymaster key we need.
        Keymaster.encrypt("maglock:key", "notasecret")
Exemple #4
0
  def setUp(self):
    super(GiftCodeTest, self).setUp()

    # Create the a keymaster key for a valid code.
    self.code = "eulalie"
    Keymaster.encrypt("code:hash", self.code)
Exemple #5
0
    def setUp(self):
        super(GiftCodeTest, self).setUp()

        # Create the a keymaster key for a valid code.
        self.code = "eulalie"
        Keymaster.encrypt("code:hash", self.code)