Esempio n. 1
0
    def test_template(self):
        expected_template = '''
{
  "version": {{ version }} {{"," if extension_bundle}}
  {{ extension_bundle }}
}
'''
        template = self.env.get_template("host.json.jinja2")
        return prettify_json(template.render(version='"2.0"',
                                             extension_bundle=self._get_extension_bundle()))
    def serialize_functions_json_file(self, operation):
        template = self.env.get_template("functions.json.jinja2")

        return prettify_json(
            template.render(script_filename=self.default_script_filename,
                            input_trigger=InputTriggerSerializer(
                                operation, self.env),
                            output_bindings=[
                                OutputBindingsSerializer(operation, self.env)
                            ],
                            is_disabled=False))
Esempio n. 3
0
 def serialize_local_settings_json_file(self):
     template = self.env.get_template("local.settings.json.jinja2")
     return prettify_json(
         template.render(is_encrypted="false",
                         azure_web_jobs_storage_secret='""',
                         language_worker_runtime='"python"'))
Esempio n. 4
0
 def serialize_host_json_file(self):
     template = self.env.get_template("host.json.jinja2")
     return prettify_json(
         template.render(version='"2.0"',
                         extension_bundle=self._get_extension_bundle()))
 def serialize_autorest_generated_json_file(self):
     template = self.env.get_template("autorest_generated.json.jinja2")
     return prettify_json(template.render(version='"0.2.0-preview"'))
Esempio n. 6
0
 def serialize_extensions_json_file(self):
     template = self.env.get_template("vscode/extensions.json.jinja2")
     return prettify_json(template.render())
Esempio n. 7
0
 def serialize_local_settings_json_file(self):
     template = self.env.get_template("local.settings.json.jinja2")
     return prettify_json(template.render())
Esempio n. 8
0
 def serialize_host_json_file(self):
     template = self.env.get_template("host.json.jinja2")
     return prettify_json(template.render())