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."))
def test_authenticated_is_False_when_authentication_is_NoAuthn(self): resource = OperationsResource( StubHandler, authentication=NoAuthentication() ) self.assertThat(resource.is_authentication_attempted, Is(False))