import boto3.session
import pytest
import bloop


@pytest.fixture
def session():
    return boto3.session.Session(region_name='us-west-2',
                                 aws_access_key_id='ACCESS_KEY',
                                 aws_secret_access_key='SECRET_KEY')


@pytest.fixture
def engine(session):
    return bloop.Engine(session=session)

@@ -1,28 +1,20 @@
 import b
-oto3.session
+loop
 %0Aimport 
@@ -20,28 +20,46 @@
  pytest%0A
-import bloop
+%0A%0Adef noop(*a, **kw):%0A    pass
 %0A%0A%0A@pyte
@@ -92,195 +92,373 @@
     
-return boto3.session.Session(region_name='us-west-2',%0A                                 aws_access_key_id='ACCESS_KEY',%0A                                 aws_secret_access_key='SECRET_KEY')
+class Client:%0A        pass%0A%0A    class Session:%0A        def client(self, name):%0A            assert name == %22dynamodb%22%0A            return Client()%0A    return Session()%0A%0A%0A@pytest.fixture%0Adef engine(session):%0A    return bloop.Engine(session=session)%0A%0A%0A@pytest.fixture%0Adef local_bind(engine):%0A    engine.client.create_table = noop%0A    engine.client.validate_table = noop
 %0A%0A%0A@
@@ -480,62 +480,449 @@
 def 
+User(
 engine
-(session):%0A    return bloop.Engine(session=session)
+, local_bind):%0A    class User(engine.model):%0A        id = bloop.Column(bloop.UUID, hash_key=True)%0A        age = bloop.Column(bloop.Integer)%0A        name = bloop.Column(bloop.String)%0A        email = bloop.Column(bloop.String)%0A        joined = bloop.Column(bloop.DateTime)%0A%0A        by_email = bloop.GlobalSecondaryIndex(hash_key='email',%0A                                              projection='all')%0A    engine.bind()%0A    return User
 %0A

Simplify binding engines locally