add try catch for missing package in old boto versions

This commit is contained in:
Sorin 2014-01-07 12:59:36 +02:00
commit 6277f72c07
3 changed files with 23 additions and 15 deletions

View file

@ -3,12 +3,15 @@ import sure # noqa
from freezegun import freeze_time
from boto.exception import JSONResponseError
from moto import mock_dynamodb2
from boto.dynamodb2.fields import HashKey
from boto.dynamodb2.fields import RangeKey
from boto.dynamodb2.table import Table
from boto.dynamodb2.table import Item
from tests.helpers import requires_boto_gte
try:
from boto.dynamodb2.fields import HashKey
from boto.dynamodb2.fields import RangeKey
from boto.dynamodb2.table import Table
from boto.dynamodb2.table import Item
except ImportError:
print "This boto version is not supported"
def create_table():
table = Table.create('messages', schema=[
HashKey('forum_name')