Port test suite from nose to pytest.
This just eliminates all errors on the tests collection. Elimination of failures is left to the next commit.
This commit is contained in:
parent
47dbad291e
commit
77dc60ea97
146 changed files with 1172 additions and 1277 deletions
|
|
@ -2,7 +2,7 @@ import boto3
|
|||
import yaml
|
||||
import sure # noqa
|
||||
|
||||
from nose.tools import assert_raises
|
||||
import pytest
|
||||
from botocore.exceptions import ClientError
|
||||
|
||||
from moto import mock_iam, mock_cloudformation, mock_s3, mock_sts
|
||||
|
|
@ -111,7 +111,7 @@ Resources:
|
|||
|
||||
cf_client.update_stack(StackName=stack_name, TemplateBody=template)
|
||||
|
||||
with assert_raises(ClientError) as e:
|
||||
with pytest.raises(ClientError) as e:
|
||||
iam_client.get_user(UserName=original_user_name)
|
||||
e.exception.response["Error"]["Code"].should.equal("NoSuchEntity")
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ Resources:
|
|||
second_user_name.should.equal(second_provisioned_user["PhysicalResourceId"])
|
||||
|
||||
iam_client.get_user(UserName=second_user_name)
|
||||
with assert_raises(ClientError) as e:
|
||||
with pytest.raises(ClientError) as e:
|
||||
iam_client.get_user(UserName=first_user_name)
|
||||
e.exception.response["Error"]["Code"].should.equal("NoSuchEntity")
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ Resources:
|
|||
|
||||
cf_client.delete_stack(StackName=stack_name)
|
||||
|
||||
with assert_raises(ClientError) as e:
|
||||
with pytest.raises(ClientError) as e:
|
||||
user = iam_client.get_user(UserName=user_name)
|
||||
e.exception.response["Error"]["Code"].should.equal("NoSuchEntity")
|
||||
|
||||
|
|
@ -235,7 +235,7 @@ Resources:
|
|||
|
||||
cf_client.delete_stack(StackName=stack_name)
|
||||
|
||||
with assert_raises(ClientError) as e:
|
||||
with pytest.raises(ClientError) as e:
|
||||
user = iam_client.get_user(UserName=user_name)
|
||||
e.exception.response["Error"]["Code"].should.equal("NoSuchEntity")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue