Exemple #1
0
 def test_authentication_must_be_meaningful(self):
     error = self.assertRaises(AssertionError,
                               self.resource_type,
                               StubHandler,
                               authentication=NoAuthentication())
     self.assertThat(str(error),
                     Equals("Authentication must be attempted."))
Exemple #2
0
 def test_authenticated_is_False_when_authentication_is_NoAuthn(self):
     resource = OperationsResource(
         StubHandler, authentication=NoAuthentication()
     )
     self.assertThat(resource.is_authentication_attempted, Is(False))