Пример #1
0
 def test_060_template_file_not_found(self):
     '''
     Test client failure when template file is not found
     '''
     sys.argv = ['jinjalive', '-cf', '%s/sample_context.yaml' % TESTDATA_DIR, '-tf', '%s/sample_template_not_found.tpl' % TESTDATA_DIR, '-of', '/tmp/jinjalive.out']
     with self.assertRaises(SystemExit):
         main()
Пример #2
0
 def test_040_missing_output_parameter(self):
     '''
     Test client failure if output parameter is missing
     '''
     sys.argv = ['jinjalive', '-cf', '%s/sample_context.yaml' % TESTDATA_DIR, '-tf', '%s/sample_template_success.tpl' % TESTDATA_DIR]
     with self.assertRaises(SystemExit):
         main()
Пример #3
0
 def test_020_missing_context_parameter(self):
     '''
     Test client failure if context parameter is missing
     '''
     sys.argv = ['jinjalive', '-tf', '%s/sample_template_success.tpl' % TESTDATA_DIR, '-of', '/tmp/jinjalive.out']
     with self.assertRaises(SystemExit):
         main()
Пример #4
0
 def test_030_missing_template_parameter(self):
     '''
     Test client failure if template parameter is missing
     '''
     sys.argv = ['jinjalive', '-cf', '%s/sample_context.yaml' % TESTDATA_DIR, '-of', '/tmp/jinjalive.out']
     with self.assertRaises(SystemExit):
         main()
Пример #5
0
 def test_010_success_client(self):
     '''
     Test client success if correct context and template files
     '''
     sys.argv = ['jinjalive', '--noverbose', '-cf', '%s/sample_context.yaml' % TESTDATA_DIR, '-tf', '%s/sample_template_success.tpl' % TESTDATA_DIR, '-of', '/tmp/jinjalive.out']
     main()