PEP8
This commit is contained in:
parent
5086e6e590
commit
81547e1bc5
@ -1,11 +1,12 @@
|
|||||||
from moto.core import BaseBackend
|
from moto.core import BaseBackend
|
||||||
|
|
||||||
|
|
||||||
class DynamoDBBackend(BaseBackend):
|
class DynamoDBBackend(BaseBackend):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.tables = {}
|
self.tables = {}
|
||||||
|
|
||||||
def create_table(self, name):
|
def create_table(self, name):
|
||||||
self.tables[name] = None
|
self.tables[name] = None
|
||||||
|
|
||||||
dynamodb_backend = DynamoDBBackend()
|
dynamodb_backend = DynamoDBBackend()
|
||||||
|
@ -2,8 +2,9 @@ import re
|
|||||||
import json
|
import json
|
||||||
from .models import dynamodb_backend
|
from .models import dynamodb_backend
|
||||||
|
|
||||||
|
|
||||||
class DynamoHandler(object):
|
class DynamoHandler(object):
|
||||||
|
|
||||||
def __init__(self, uri, body, headers):
|
def __init__(self, uri, body, headers):
|
||||||
self.uri = uri
|
self.uri = uri
|
||||||
self.body = body
|
self.body = body
|
||||||
@ -26,7 +27,7 @@ class DynamoHandler(object):
|
|||||||
tables = dynamodb_backend.tables.keys()
|
tables = dynamodb_backend.tables.keys()
|
||||||
response = {"TableNames": tables}
|
response = {"TableNames": tables}
|
||||||
return json.dumps(response)
|
return json.dumps(response)
|
||||||
|
|
||||||
|
|
||||||
def handler(uri, body, headers):
|
def handler(uri, body, headers):
|
||||||
return DynamoHandler(uri, body, headers).dispatch()
|
return DynamoHandler(uri, body, headers).dispatch()
|
||||||
|
Loading…
Reference in New Issue
Block a user