# 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
"""
Tests for the Base API Resource class
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
try:
except ImportError:
    print("WARNING: Cannot Load builtins for py3 compatibility.", file=sys.stderr)





warnings.simplefilter("error")  # Make All warnings errors while testing.

def test_required_schema():
    """ Resources must have a schema. """
    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. """


# 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

"""
Tests for the Base API Resource class
"""
from __future__ import (absolute_import, division, print_function, unicode_literals)
try:
except ImportError:
    print("WARNING: Cannot Load builtins for py3 compatibility.", file=sys.stderr)





warnings.simplefilter("error")  # Make All warnings errors while testing.

def test_required_schema():
    """ Resources must have a schema. """
    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):