def test_get_runtime(self): config = Config(self.conf_file) eq_(config.get_runtime(), 'python2.7') open(self.conf_file, 'w').write(NODE_CONF) config = Config(self.conf_file) runtime = config.get_configuration().get('runtime') eq_(runtime, 'nodejs4.3') open(self.conf_file, 'w').write(NODE43_CONF) config = Config(self.conf_file) runtime = config.get_configuration().get('runtime') eq_(runtime, 'nodejs4.3')
def test_get_function_filename(self): config = Config(self.conf_file) eq_(config.get_function_filename(), 'lambda_function.py') open(self.conf_file, 'w').write(NODE_CONF) config = Config(self.conf_file) runtime = config.get_configuration().get('runtime') eq_(runtime, 'nodejs') eq_(config.get_function_filename(), 'lambda_function.js')
def test_get_function_filename(self): config = Config(self.conf_file) eq_(config.get_function_filename(), "lambda_function.py") open(self.conf_file, "w").write(NODE_CONF) config = Config(self.conf_file) runtime = config.get_configuration().get("runtime") eq_(runtime, "nodejs") eq_(config.get_function_filename(), "lambda_function.js")
def test_get_configuration(self): config = Config(self.conf_file) eq_(config.get_configuration().get('test_env'), os.environ.get('PATH'))
def test_get_vpc_configuration(self): config = Config(self.conf_file) eq_(config.get_vpc_configuration().get('subnets'), ['subnet-xxxxxxxx']) config.get_configuration = Mock(return_value={}) eq_(config.get_vpc_configuration().get('subnets'), [])
def test_get_configuration(self): config = Config(self.conf_file) eq_(config.get_configuration().get("test_env"), os.environ.get("PATH"))