Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(24)  |  Call(24)  |  Derive(0)  |  Import(0)

src/m/o/mozservices-HEAD/mozsvc/tests/test_user.py   mozservices(Download)
            "HTTP_X_PASSWORD": "user1",
        })
        self.assertEquals(request.user["uid"], "user1")
        self.assertEquals(request.user["x-was-ere"], True)
        # Bad password => request.user is empty
        hawkauthlib.sign_request(req, tokenid, key)
        # That should be enough to authenticate.
        self.assertEquals(authenticated_userid(req), 42)
        self.assertEquals(req.user.get("uid"), 42)
        # Check that it rejects invalid Hawk ids.
        hawkauthlib.sign_request(req, tokenid, key)
        req.user = {"uid": 7}
        self.assertEquals(req.user, {"uid": 7})
 
    def test_that_hawkauth_cant_use_both_secret_and_secrets_file(self):

src/m/o/mozsvc-0.7/mozsvc/tests/test_user.py   mozsvc(Download)
                    "HTTP_X_PASSWORD": "user1",
                  })
        self.assertEquals(request.user["uid"], "user1")
        self.assertEquals(request.user["x-was-ere"], True)
        # Bad password => request.user is empty
        macauthlib.sign_request(req, tokenid, key)
        # That should be enough to authenticate.
        self.assertEquals(authenticated_userid(req), 42)
        self.assertEquals(req.user.get("uid"), 42)
        # Check that it rejects invalid MAC ids.
        macauthlib.sign_request(req, tokenid, key)
        req.user = {"uid": 7}
        self.assertEquals(req.user, {"uid": 7})
 
    def test_that_macauth_cant_use_both_secret_and_secrets_file(self):