# Path: models/bases.py
# NO_VALUE = sa_symbol('NO_VALUE')
# class Base(object):
# class BaseModel(Base):
#     def __repr__(self):
#     def __str__(self):
#     def __tablename__(cls):  # pylint: disable=no-self-argument
#     def delete(self):
#     def _prepare_conditions(cls, conditions):
#     def get_all(cls, conditions=None):
#     def get_by_pk(cls, the_id):
#     def save(self, flush=False):
# 
# Path: ourapi/resource.py
# class JsonApiResource(base.BaseJsonApiResource):
#     def __new__(cls):
#     def _details(self, model_id):
#     def _get_model(self, model_id):
#     def _list(self):
#     def delete(self, model_id):
#     def get(self, model_id=None):
#     def patch(self, model_id, data):
#     def post(self, data):
#     def register(cls, api):


    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from models import bases
from ourapi import resource
    import sys
import warnings
import pytest
import sqlalchemy as sa
import ourmarshmallow
    with pytest.raises(NotImplementedError):
        resource.JsonApiResource()

    class BadResource(resource.JsonApiResource):
        """ Missing the schema parameter """
        pass


    with pytest.raises(NotImplementedError):
        BadResource()

def test_new_resource():
    """ Resources only need a schema. """

    class OkModel(bases.BaseModel):
        """ Model for testing """
        value = sa.Column(sa.String(100), nullable=False)


    class OkModelSchema(ourmarshmallow.Schema):
        """ JSONAPI Schema from SQLAlchemy OkModel. """
        class Meta:  # pylint: disable=missing-docstring,too-few-public-methods
            model = OkModel


    class OkResource(resource.JsonApiResource):
        """ JSONAPI Resource for OkModelSchema endpoints. """
        schema = OkModelSchema

    jsapi_resource = OkResource()

# Path: models/bases.py
# NO_VALUE = sa_symbol('NO_VALUE')
# class Base(object):
# class BaseModel(Base):
#     def __repr__(self):
#     def __str__(self):
#     def __tablename__(cls):  # pylint: disable=no-self-argument
#     def delete(self):
#     def _prepare_conditions(cls, conditions):
#     def get_all(cls, conditions=None):
#     def get_by_pk(cls, the_id):
#     def save(self, flush=False):
# 
# Path: ourapi/resource.py
# class JsonApiResource(base.BaseJsonApiResource):
#     def __new__(cls):
#     def _details(self, model_id):
#     def _get_model(self, model_id):
#     def _list(self):
#     def delete(self, model_id):
#     def get(self, model_id=None):
#     def patch(self, model_id, data):
#     def post(self, data):
#     def register(cls, api):


# Path: tests/ourapi/test_resource_base.py
    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from models import bases
from ourapi import resource
    import sys
import warnings
import pytest
import sqlalchemy as sa
import ourmarshmallow

    with pytest.raises(NotImplementedError):
        resource.JsonApiResource()

    class BadResource(resource.JsonApiResource):
        """ Missing the schema parameter """
        pass


    with pytest.raises(NotImplementedError):
        BadResource()

def test_new_resource():
    """ Resources only need a schema. """

    class OkModel(bases.BaseModel):
        """ Model for testing """
        value = sa.Column(sa.String(100), nullable=False)


    class OkModelSchema(ourmarshmallow.Schema):
        """ JSONAPI Schema from SQLAlchemy OkModel. """
        class Meta:  # pylint: disable=missing-docstring,too-few-public-methods
            model = OkModel


    class OkResource(resource.JsonApiResource):
        """ JSONAPI Resource for OkModelSchema endpoints. """
        schema = OkModelSchema

    jsapi_resource = OkResource()

    assert isinstance(jsapi_resource, resource.JsonApiResource)