Exemple #1
0
   def test_print_people(self, mock_input, mock_ppp):
      from src.app import app

      app()

      self.assertEqual(mock_input.call_count, 2)
      mock_ppp.assert_called_once()
Exemple #2
0
from src.app import app


if __name__ == "__main__":
    app()
Exemple #3
0
'''
Main entry point for the program, used to centralise the spec file and the
settings for the loggers.

Usage python main.py file_fw file_ad
file_fw: file to save fixed width sample in.
file_ad: file to save ASCII delimited translation of above file in.
'''
from src.spec import spec
from src.app import app
import logging
import sys

logging.basicConfig(level=logging.WARNING)

if __name__ == '__main__':
    file_fw = sys.argv[1]
    file_ad = sys.argv[2]
    random = sys.argv[3]
    # TODO Fix the cl arguments using argparse.
    app(spec, file_fw, file_ad, random)
Exemple #4
0
def lambda_handler(event, context):
    logging.info("Starting")
    app(event['username'])
    logging.info('finish')
Exemple #5
0
from src.app import app


if __name__ == '__main__':
    print(app())
Exemple #6
0
 def test_main(self):
     self.assertEqual('Hello, World!', app())