예제 #1
0
    def test___init__(self):
        """Assert the request is stored properly."""
        request = testing.DummyRequest()

        schemas_resource = schemas.MessageSchemasV1(request)

        self.assertIs(schemas_resource.request, request)
예제 #2
0
    def test___acl__(self):
        """Assert the permissions are correct."""
        request = testing.DummyRequest()
        schemas_resource = schemas.MessageSchemasV1(request)

        acls = schemas_resource.__acl__()

        self.assertEqual(acls, [(security.Allow, security.Everyone, 'view_schemas')])
예제 #3
0
    def test___acl__(self):
        """Assert the permissions are correct."""
        request = testing.DummyRequest()
        schemas_resource = schemas.MessageSchemasV1(request)

        acls = schemas_resource.__acl__()

        assert acls == [(Allow, Everyone, 'view_schemas')]