def test_main_stream(self): sys.argv = [sys.argv[0], "example.example_handler", "example/ex-stream.ldjson", "-s"] try: emulambda.main() assert True except BaseException as e: self.fail("Main method failed.\n%s" % e.message)
def test_main_single_event(self): sys.argv = [sys.argv[0], 'example.example_handler', 'example/example.json'] try: emulambda.main() assert True except BaseException as e: self.fail("Main method failed.\n%s" % e.message)
def output_emulambda(out_file): context_file = os.path.join('..', 'test', 'integration', 'context') sys.argv = [ 'emulambda', 'stream_alert_output.main.handler', out_file, context_file, '-v' ] import emulambda emulambda.main()
def test_main_single_event(self): sys.argv = [ sys.argv[0], 'example.example_handler', 'example/example.json' ] try: emulambda.main() assert True except BaseException as e: self.fail("Main method failed.\n%s" % e.message)
def alert_emulambda(out_file): # context_file = os.path.join(BASEFOLDER, 'context') sys.argv = ['emulambda', 'main.handler', out_file, '-v'] import emulambda emulambda.main()