Add BaseModel to all models.

This commit is contained in:
Steve Pulec 2017-03-11 23:41:12 -05:00
commit 6d422d1f37
34 changed files with 122 additions and 116 deletions

View file

@ -6,13 +6,13 @@ import boto.rds
from jinja2 import Template
from moto.cloudformation.exceptions import UnformattedGetAttTemplateException
from moto.core import BaseBackend
from moto.core import BaseBackend, BaseModel
from moto.core.utils import get_random_hex
from moto.ec2.models import ec2_backends
from moto.rds2.models import rds2_backends
class Database(object):
class Database(BaseModel):
def __init__(self, **kwargs):
self.status = "available"
@ -239,7 +239,7 @@ class Database(object):
backend.delete_database(self.db_instance_identifier)
class SecurityGroup(object):
class SecurityGroup(BaseModel):
def __init__(self, group_name, description):
self.group_name = group_name
@ -317,7 +317,7 @@ class SecurityGroup(object):
backend.delete_security_group(self.group_name)
class SubnetGroup(object):
class SubnetGroup(BaseModel):
def __init__(self, subnet_name, description, subnets):
self.subnet_name = subnet_name