Fix bug when running ipresolver under Gitlab CI

Since the container does contain IP data, this would fail
This commit is contained in:
Joseph Schorr 2017-11-30 10:23:58 -05:00
parent 51b043bd23
commit c168413a8e

View file

@ -25,9 +25,14 @@ def aws_ip_range_data():
def test_unstarted(app, test_aws_ip):
ipresolver = IPResolver(app)
assert ipresolver.resolve_ip(test_aws_ip) is None
def test_resolved(aws_ip_range_data, test_aws_ip, app,):
def get_data():
return None
with patch.object(ipresolver, '_get_aws_ip_ranges', get_data):
assert ipresolver.resolve_ip(test_aws_ip) is None
def test_resolved(aws_ip_range_data, test_aws_ip, app):
ipresolver = IPResolver(app)
def get_data():