Test out py26 with new HTTPretty
This commit is contained in:
parent
fe1f3ec06c
commit
3bddbb4af3
23 changed files with 81 additions and 68 deletions
|
|
@ -1,7 +1,14 @@
|
|||
from collections import defaultdict, OrderedDict
|
||||
from collections import defaultdict
|
||||
import datetime
|
||||
import json
|
||||
|
||||
try:
|
||||
from collections import OrderedDict
|
||||
except ImportError:
|
||||
# python 2.6 or earlier, use backport
|
||||
from ordereddict import OrderedDict
|
||||
|
||||
|
||||
from moto.core import BaseBackend
|
||||
from .comparisons import get_comparison_func
|
||||
from .utils import unix_time
|
||||
|
|
@ -36,7 +43,7 @@ class DynamoType(object):
|
|||
)
|
||||
|
||||
def __repr__(self):
|
||||
return "DynamoType: {}".format(self.to_json())
|
||||
return "DynamoType: {0}".format(self.to_json())
|
||||
|
||||
def to_json(self):
|
||||
return {self.type: self.value}
|
||||
|
|
@ -62,7 +69,7 @@ class Item(object):
|
|||
self.attrs[key] = DynamoType(value)
|
||||
|
||||
def __repr__(self):
|
||||
return "Item: {}".format(self.to_json())
|
||||
return "Item: {0}".format(self.to_json())
|
||||
|
||||
def to_json(self):
|
||||
attributes = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue