from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.schema import Column
from sqlalchemy.types import Integer
from unittest import TestCase
from zope.component import provideAdapter
from zope.interface import implements,Interface


class TestAdapter(TestCase):
    
    def test_provideAdapter(self):
        # setup
        Base = declarative_base()
        class Model(Base):
            __tablename__='model'
            id = Column('id', Integer, primary_key=True)

        class IMyInterface(Interface):
            pass

        class MyAdapter:
            implements(IMyInterface)

        provideAdapter(MyAdapter,Model)
