Tech debt (#3653)
This commit is contained in:
parent
81859f9180
commit
737636f9df
20 changed files with 11 additions and 57 deletions
|
|
@ -387,22 +387,6 @@ def test_duplicate_put_metric_data():
|
|||
Namespace="tester", Dimensions=[{"Name": "Name", "Value": "B"}]
|
||||
)["Metrics"]
|
||||
len(result).should.equal(1)
|
||||
|
||||
conn.put_metric_data(
|
||||
Namespace="tester",
|
||||
MetricData=[
|
||||
dict(
|
||||
MetricName="metric",
|
||||
Dimensions=[{"Name": "Name", "Value": "B"}],
|
||||
Value=1.5,
|
||||
Timestamp=utc_now,
|
||||
)
|
||||
],
|
||||
)
|
||||
|
||||
result = conn.list_metrics(
|
||||
Namespace="tester", Dimensions=[{"Name": "Name", "Value": "B"}]
|
||||
)["Metrics"]
|
||||
result.should.equal(
|
||||
[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import boto3
|
|||
from boto.exception import EC2ResponseError
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
import sure # noqa
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto3
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
|||
import boto
|
||||
import boto3
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
import sure # noqa
|
||||
from boto.exception import EC2ResponseError
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto3
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import time
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
import pytest
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import re
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
|||
import copy
|
||||
import json
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
|
||||
import boto3
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import boto
|
|||
import boto3
|
||||
import boto.vpc
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
import sure # noqa
|
||||
from boto.exception import EC2ResponseError
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
from moto.ec2.exceptions import EC2ClientError
|
||||
from botocore.exceptions import ClientError
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
# Ensure 'pytest.raises' context manager support for Python 2.6
|
||||
import pytest
|
||||
from moto.ec2.exceptions import EC2ClientError
|
||||
from botocore.exceptions import ClientError
|
||||
|
|
|
|||
|
|
@ -45,6 +45,14 @@ def test_describe_model():
|
|||
assert model.get("ModelName").should.equal("blah")
|
||||
|
||||
|
||||
@mock_sagemaker
|
||||
def test_describe_model_not_found():
|
||||
client = boto3.client("sagemaker", region_name="us-east-1")
|
||||
with pytest.raises(ClientError) as err:
|
||||
client.describe_model(ModelName="unknown")
|
||||
assert err.value.response["Error"]["Message"].should.contain("Could not find model")
|
||||
|
||||
|
||||
@mock_sagemaker
|
||||
def test_create_model():
|
||||
client = boto3.client("sagemaker", region_name="us-east-1")
|
||||
|
|
|
|||
|
|
@ -2349,7 +2349,7 @@ def test_fifo_queue_deduplication_withoutid(msg_1, msg_2, expected_count):
|
|||
@mock_sqs
|
||||
def test_fifo_queue_send_duplicate_messages_after_deduplication_time_limit():
|
||||
if settings.TEST_SERVER_MODE:
|
||||
raise SkipTest("Cant manipulate time in server mode")
|
||||
raise SkipTest("Cant patch env variables in server mode")
|
||||
|
||||
sqs = boto3.resource("sqs", region_name="us-east-1")
|
||||
msg_queue = sqs.create_queue(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue