예제 #1
0
파일: test.py 프로젝트: fugue/emulambda
 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)
예제 #2
0
 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)
예제 #3
0
 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()
예제 #4
0
파일: test.py 프로젝트: yokuba/emulambda
 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)
예제 #5
0
 def alert_emulambda(out_file):
     # context_file = os.path.join(BASEFOLDER, 'context')
     sys.argv = ['emulambda', 'main.handler', out_file, '-v']
     import emulambda
     emulambda.main()