Skip to content

Commit 7739177

Browse files
committed
attempt to fix tests
1 parent 6844468 commit 7739177

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ configargparse>=0.9.3
22
PyYAML>=5.3.1
33
Jinja2>=2.7.3
44
boto>=2.40.0
5+
docker==6.1.3
56
tabulate>=0.7.5
67
setuptools==67.8.0
78
moto[all]==4.1.11

setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
'PyYAML>=4.2b1',
1414
'Jinja2>=2.7.3',
1515
'boto>=2.40.0',
16+
'docker==6.1.3',
17+
'openapi-spec-validator==0.5.7',
1618
'tabulate>=0.7.5',
1719
'setuptools',
1820
'pytz',

stacks/cf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
import json
88
import sys
99
import time
10-
# noinspection PyProtectedMember
11-
from collections import Mapping, Set, Sequence
1210
from datetime import datetime
1311
from fnmatch import fnmatch
1412
from operator import attrgetter
1513
from os import path
14+
from typing import Mapping, Sequence, Set
1615

1716
import boto
1817
import jinja2
@@ -25,7 +24,8 @@
2524

2625
from stacks.aws import get_stack_tag, get_stack_template, throttling_retry
2726
from stacks.helpers import intrinsics_multi_constructor
28-
from stacks.states import FAILED_STACK_STATES, COMPLETE_STACK_STATES, ROLLBACK_STACK_STATES, IN_PROGRESS_STACK_STATES
27+
from stacks.states import (COMPLETE_STACK_STATES, FAILED_STACK_STATES,
28+
IN_PROGRESS_STACK_STATES, ROLLBACK_STACK_STATES)
2929

3030
YES = ['y', 'Y', 'yes', 'YES', 'Yes']
3131

stacks/main.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,10 @@
1010
import boto.vpc
1111
import pytz
1212

13-
from stacks import aws
14-
from stacks import cf
15-
from stacks import cli
16-
from stacks.config import config_load
17-
from stacks.config import get_default_region_name
18-
from stacks.config import get_region_name
19-
from stacks.config import print_config
20-
from stacks.config import profile_exists
21-
from stacks.config import validate_properties
13+
from stacks import aws, cf, cli
14+
from stacks.config import (config_load, get_default_region_name,
15+
get_region_name, print_config, profile_exists,
16+
validate_properties)
2217
from stacks.states import FAILED_STACK_STATES, ROLLBACK_STACK_STATES
2318

2419

tests/test_cf.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import unittest
22

33
from boto import cloudformation, s3
4-
5-
from moto import mock_cloudformation_deprecated
4+
from moto import mock_cloudformation
65

76
from stacks import cf
87

@@ -42,7 +41,7 @@ def test_gen_invalid_template_with_null_value(self):
4241
self.assertEqual(len(errors), 1)
4342

4443

45-
@mock_cloudformation_deprecated
44+
@mock_cloudformation
4645
class TestStackActions(unittest.TestCase):
4746

4847
def setUp(self):

0 commit comments

Comments
 (0)