# Generates validation/input definitions as if they were created by splunk for tests
class MockDefinitions(object):
    def __init__(self, session_key=None):
        self.session_key = session_key if session_key is not None else '123456789'

    @property
    def metadata(self):
        host = os.getenv('SPLUNK_API_HOST', 'localhost')
        port = os.getenv('SPLUNK_API_PORT', 8089),
        return {'server_uri': 'https://{host}:{port}/', 'session_key': self.session_key,
                'name': 'amp4e_events_test_input'}

@@ -1,8 +1,18 @@
+import os%0A
 # Genera
@@ -332,70 +332,19 @@
 ', '
-localhost')%0A        port = os.getenv('SPLUNK_API_PORT', 8089),
+127.0.0.1')
 %0A   
@@ -390,16 +390,32 @@
 st%7D:
-%7Bport%7D/'
+8089/'.format(host=host)
 , 's

Change mock to be env dependant