@@ -0,0 +1,965 @@
+try:%0A    from collections import OrderedDict%0Aexcept ImportError:%0A    from ordereddict import OrderedDict%0Aimport sqlalchemy as sa%0Afrom sqlalchemy_utils import primary_keys%0Afrom tests import TestCase%0A%0A%0Aclass TestPrimaryKeys(TestCase):%0A    def create_models(self):%0A        class Building(self.Base):%0A            __tablename__ = 'building'%0A            id = sa.Column('_id', sa.Integer, primary_key=True)%0A            name = sa.Column('_name', sa.Unicode(255))%0A%0A        self.Building = Building%0A%0A    def test_table(self):%0A        assert primary_keys(self.Building.__table__) == OrderedDict(%7B%0A            '_id': self.Building.__table__.c._id%0A        %7D)%0A%0A    def test_declarative_class(self):%0A        assert primary_keys(self.Building) == OrderedDict(%7B%0A            'id': self.Building.__table__.c._id%0A        %7D)%0A%0A    def test_declarative_object(self):%0A        assert primary_keys(self.Building()) == OrderedDict(%7B%0A            'id': self.Building.__table__.c._id%0A        %7D)%0A

Add tests for primary_keys