Fix bug when running ipresolver under Gitlab CI
Since the container does contain IP data, this would fail
This commit is contained in:
parent
51b043bd23
commit
c168413a8e
1 changed files with 7 additions and 2 deletions
|
@ -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():
|
||||
|
|
Reference in a new issue