class SchemaParserTestCase(unittest.TestCase):
    def setUp(self):
        schema_file = open(os.path.join("tests", "schema_"), "r")
        self.schema_str = schema_file.read()
        self.parser = SchemaParser(self.schema_str)

    def test_parse(self):
        self.parser.parse()
        yaml_file = open("schema.yaml", "r")

        self.assertIsNot(yaml_file, None)
        yaml = yaml_file.read()
        self.assertIsNot(yaml, None)
        base_yaml = open("tests/mock_schema.yaml", "r")
        base = base_yaml.read()
        self.assertEqual(yaml, base)
Exemplo n.º 2
0
class SchemaParserTestCase(unittest.TestCase):
  def setUp(self):
    schema_file = open(os.path.join("tests", 'schema_'), 'r')
    self.schema_str = schema_file.read()
    self.parser = SchemaParser(self.schema_str)


  def test_parse(self):
    self.parser.parse()
    yaml_file = open('schema.yaml', 'r')

    self.assertIsNot(yaml_file, None)
    yaml = yaml_file.read()
    self.assertIsNot(yaml, None)
    base_yaml = open('tests/mock_schema.yaml', 'r')
    base = base_yaml.read()
    self.assertEqual(yaml, base)
 def setUp(self):
     schema_file = open(os.path.join("tests", "schema_"), "r")
     self.schema_str = schema_file.read()
     self.parser = SchemaParser(self.schema_str)
Exemplo n.º 4
0
 def setUp(self):
   schema_file = open(os.path.join("tests", 'schema_'), 'r')
   self.schema_str = schema_file.read()
   self.parser = SchemaParser(self.schema_str)