Get standalone server mode working for all tests.

This commit is contained in:
Steve Pulec 2017-02-23 19:43:48 -05:00
commit 81836b6981
78 changed files with 957 additions and 783 deletions

View file

@ -4,7 +4,6 @@ import datetime
from botocore.exceptions import ClientError
import boto3
from freezegun import freeze_time
import sure # noqa
from moto import mock_kinesis
@ -37,7 +36,6 @@ def create_stream(client, stream_name):
@mock_kinesis
@freeze_time("2015-03-01")
def test_create_stream():
client = boto3.client('firehose', region_name='us-east-1')
@ -48,11 +46,8 @@ def test_create_stream():
stream_description = response['DeliveryStreamDescription']
# Sure and Freezegun don't play nicely together
created = stream_description.pop('CreateTimestamp')
last_updated = stream_description.pop('LastUpdateTimestamp')
from dateutil.tz import tzlocal
assert created == datetime.datetime(2015, 3, 1, tzinfo=tzlocal())
assert last_updated == datetime.datetime(2015, 3, 1, tzinfo=tzlocal())
_ = stream_description.pop('CreateTimestamp')
_ = stream_description.pop('LastUpdateTimestamp')
stream_description.should.equal({
'DeliveryStreamName': 'stream1',
@ -88,7 +83,6 @@ def test_create_stream():
@mock_kinesis
@freeze_time("2015-03-01")
def test_create_stream_without_redshift():
client = boto3.client('firehose', region_name='us-east-1')
@ -111,11 +105,8 @@ def test_create_stream_without_redshift():
stream_description = response['DeliveryStreamDescription']
# Sure and Freezegun don't play nicely together
created = stream_description.pop('CreateTimestamp')
last_updated = stream_description.pop('LastUpdateTimestamp')
from dateutil.tz import tzlocal
assert created == datetime.datetime(2015, 3, 1, tzinfo=tzlocal())
assert last_updated == datetime.datetime(2015, 3, 1, tzinfo=tzlocal())
_ = stream_description.pop('CreateTimestamp')
_ = stream_description.pop('LastUpdateTimestamp')
stream_description.should.equal({
'DeliveryStreamName': 'stream1',
@ -142,7 +133,6 @@ def test_create_stream_without_redshift():
})
@mock_kinesis
@freeze_time("2015-03-01")
def test_deescribe_non_existant_stream():
client = boto3.client('firehose', region_name='us-east-1')
@ -150,7 +140,6 @@ def test_deescribe_non_existant_stream():
@mock_kinesis
@freeze_time("2015-03-01")
def test_list_and_delete_stream():
client = boto3.client('firehose', region_name='us-east-1')