Example #1
0
    def test_validRequest(self):
        """
        Cross-pod request fails when there is no shared secret header present.
        """

        conduit = PoddingConduit(self.storeUnderTest())
        r1, r2 = yield conduit.validRequest("user01", "puser02")
        self.assertTrue(r1 is not None)
        self.assertTrue(r2 is not None)

        yield self.assertFailure(
            conduit.validRequest("bogus01", "user02"),
            DirectoryRecordNotFoundError
        )

        yield self.assertFailure(
            conduit.validRequest("user01", "bogus02"),
            DirectoryRecordNotFoundError
        )

        yield self.assertFailure(
            conduit.validRequest("user01", "user02"),
            FailedCrossPodRequestError
        )
Example #2
0
 def makeConduit(self, store):
     conduit = PoddingConduit(store)
     conduit.conduitRequestClass = FakeConduitRequest
     return conduit