Commits

Jean-Tiare Le Bigot committed e2fcd40

fix #5: do not require user credentials in boto patch

Comments (0)

Files changed (4)

 - pre-instanciate DynamoDB as dynamodb
 - UpdateItem failed to save keys properly
 - integrate boto dynamodb integration tests to test suite (disabled unless '--no-skip')
+- do not require (real) user credentials in boto patch version (#5)
 
 Upgrade
 -------
 from pyramid.config import Configurator
 from ddbmock.router.pyramid import pyramid_router
 
+def noop(*args, **kwargs): pass
+
 # Pyramid entry point
 def main(global_config, **settings):
     """ This function returns a Pyramid WSGI application.
     from boto.dynamodb.layer1 import Layer1
     from router.boto import boto_router
     Layer1.make_request = boto_router
+    Layer1.__init__ = noop  # bypass authentication
     return boto.connect_dynamodb()
 
 ### Storage specific settings ###
 
-# Storage engine ro use ('memory' or 'sqlite')
+# Storage engine to use ('memory' or 'sqlite')
 STORAGE_ENGINE_NAME = 'memory'
 # SQLite database location
 STORAGE_SQLITE_FILE = 'dynamo.db'

tests/integration/test_boto.py

     layer1_file.close()
     layer2_file.close()
 else:
-    print "Boto Integration tests are slow hence dusabled by default, enable them with '--no-skip'"
+    print "Boto Integration tests are slow hence disabled by default, enable them with '--no-skip'"