Skip to content

Commit f506045

Browse files
committedMay 17, 2019
🔥 Removing old tests
1 parent 11c0da0 commit f506045

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed
 

‎tests/test_security_groups.py

-62
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"""
44
import unittest
55

6-
import responses
7-
86
from botocore.stub import Stubber
97

108
from secgrp_updater import main
@@ -168,66 +166,6 @@ def test_unknown_boto3_errors_cause_no_processing(self):
168166
self.assertEqual(0, len(result))
169167
self.stubber.assert_no_pending_responses()
170168

171-
# @responses.activate
172-
# def test_update_sec_groups(self):
173-
# """
174-
# Test the actual run function to know if security groups have been updated
175-
# """
176-
# responses.add(
177-
# responses.GET,
178-
# 'https://api.github.com/meta',
179-
# json={'hooks': self.allowed_ranges}
180-
# )
181-
182-
# mock_describe_response = {
183-
# 'SecurityGroups': [self.managed_sg, self.managed_sg_2]
184-
# }
185-
# expected_describe_params = {'GroupNames': [self.default_managed_group_name]}
186-
# self.stubber.add_response(
187-
# 'describe_security_groups',
188-
# mock_describe_response,
189-
# expected_describe_params
190-
# )
191-
192-
# expected_update_params_1 = {
193-
# 'GroupId': f'sg-{self.managed_id}',
194-
# 'IpPermissions': [
195-
# {
196-
# 'FromPort': 443,
197-
# 'ToPort': 443,
198-
# 'IpProtocol': 'tcp',
199-
# 'IpRanges': [{'CidrIp': ip_range} for ip_range in self.allowed_ranges]
200-
# }
201-
# ]
202-
# }
203-
# expected_update_params_2 = {
204-
# 'GroupId': f'sg-{self.managed_id_2}',
205-
# 'IpPermissions': [
206-
# {
207-
# 'FromPort': 443,
208-
# 'ToPort': 443,
209-
# 'IpProtocol': 'tcp',
210-
# 'IpRanges': [{'CidrIp': ip_range} for ip_range in self.allowed_ranges]
211-
# }
212-
# ]
213-
# }
214-
215-
# self.stubber.add_response(
216-
# 'update_security_group_rule_descriptions_ingress',
217-
# {},
218-
# expected_update_params_1
219-
# )
220-
# self.stubber.add_response(
221-
# 'update_security_group_rule_descriptions_ingress',
222-
# {},
223-
# expected_update_params_2
224-
# )
225-
226-
# with self.stubber:
227-
# main.run([f'vpc-{self.managed_id}', f'vpc-{self.managed_id_2}'])
228-
229-
# self.stubber.assert_no_pending_responses()
230-
231169
def test_update_security_group_adds_rules(self):
232170
""" Test update_security_group adds correct rules """
233171
self.stubber.add_response(

0 commit comments

Comments
 (0)
Please sign in to comment.