summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_binding.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_binding.py b/tests/test_binding.py
index 010c63d..6c8b0ef 100644
--- a/tests/test_binding.py
+++ b/tests/test_binding.py
@@ -17,6 +17,8 @@
# limitations under the License.
# ============LICENSE_END=========================================================
+import os
+import pytest
import requests
import httpretty
import subprocess
@@ -32,8 +34,17 @@ mr_url = 'http://mrrouter.onap.org:3904'
intopic = 'VESCOLL-VNFNJ-SECHEARTBEAT-OUTPUT'
outopic = 'POLICY-HILOTCA-EVENT-OUTPUT'
+
+@pytest.fixture()
+def disable_proxy(monkeypatch):
+ if 'http_proxy' in os.environ:
+ monkeypatch.delenv('http_proxy')
+ if 'HTTP_PROXY' in os.environ:
+ monkeypatch.delenv('HTTP_PROXY')
+
+
@httpretty.activate
-def test_resolve_all():
+def test_resolve_all(disable_proxy):
htbtmsg = '{"event":{"commonEventHeader":{"startEpochMicrosec":1518616063564475,"sourceId":"587c14b3-72c0-4581-b5cb-6567310b9bb7","eventId":"10048640","reportingEntityId":"587c14b3-72c0-4581-b5cb-6567310b9bb7","priority":"Normal","version":3,"reportingEntityName":"TESTVM","sequence":10048640,"domain":"heartbeat","lastEpochMicrosec":1518616063564476,"eventName":"Heartbeat_vVnf","sourceName":"TESTVM","nfNamingCode":"vVNF"}}}'
send_url = mr_url+'/events/'+intopic+'/DefaultGroup/1?timeout=15000'
print(send_url)