Esempio n. 1
0
 def test_bad_config(self):
     sio = StringIO()
     with support.stderr_replaced(sio):
         res = run_validator("--schema", support.input_file("simple.xml"),
                             support.input_file("outer.conf"))
     self.assertEqual(res, 1)
     self.assertIn("'refouter' is not a known key name", sio.getvalue())
Esempio n. 2
0
 def test_bad_config(self):
     sio = StringIO()
     with support.stderr_replaced(sio):
         res = run_validator("--schema", support.input_file("simple.xml"),
                             support.input_file("outer.conf"))
     self.assertEqual(res, 1)
     self.assertIn("'refouter' is not a known key name", sio.getvalue())
Esempio n. 3
0
 def test_cover_all_schemas(self):
     for name in ('base-datatype1.xml',
                  'base-datatype2.xml',
                  'base-keytype1.xml',
                  'base-keytype2.xml',
                  'base.xml',
                  'library.xml',
                  'simplesections.xml',):
         res = run_transform(support.input_file(name))
         self.assertIn('</html>', res.getvalue())
         run_transform_rst(support.input_file(name))
Esempio n. 4
0
 def test_html_section_example(self):
     name = 'simplesections.xml'
     res = run_transform(support.input_file(name))
     out = res.getvalue()
     self.assertIn('Section Example', out)
     self.assertIn('Multisection Example', out)
Esempio n. 5
0
 def test_schema_only(self):
     res = run_transform(support.input_file('simple.xml'))
     self.assertIn('</html>', res.getvalue())
     run_transform_rst(support.input_file('simple.xml'))
Esempio n. 6
0
 def test_good_config(self):
     res = run_validator("--schema", support.input_file('simple.xml'),
                         support.input_file('simple.conf'),
                         support.input_file('simple.conf'))
     self.assertEqual(res, 0)
Esempio n. 7
0
 def test_schema_only_redirect(self):
     res = run_validator("--schema", support.input_file('simple.xml'))
     self.assertEqual(res, 0)
Esempio n. 8
0
 def test_good_config(self):
     res = run_validator("--schema", support.input_file('simple.xml'),
                         support.input_file('simple.conf'),
                         support.input_file('simple.conf'))
     self.assertEqual(res, 0)
Esempio n. 9
0
 def test_schema_only_redirect(self):
     res = run_validator("--schema", support.input_file('simple.xml'))
     self.assertEqual(res, 0)