Exemplo n.º 1
0
 def test_read_spec(self):
     """
     function to check if YAML synatx is correct or not
     """
     global spec
     HEADING()
     Benchmark.Start()
     spec = util.readyaml(p.yamlfile)
     keys = spec.keys()
     assert "openapi" in keys
     assert "info" in keys
     assert "servers" in keys
     assert "paths" in keys
Exemplo n.º 2
0
    def test_read_spec(self):
        """
        function to check if YAML synatx is correct or not
        """
        global spec

        HEADING()
        Benchmark.Start()
        spec = util.readyaml(location)
        keys = spec.keys()

        pprint(spec)
        pprint(keys)
        assert "openapi" in keys
        assert "info" in keys
        assert "servers" in keys
        assert "paths" in keys
        assert "A simple service" in str(spec)