Exemple #1
0
    def test_appengine_config(self):
        self._install('--targets=foo@%s,bar@%s' % (self.foo_dir, self.bar_dir))
        yaml = yaml_files.AppYamlFile(self.app_yaml_path)
        os.environ.update(yaml.get_all_env())

        # Touch into place the hard-coded expected set of libs so we don't
        # get spurious errors.
        for lib in appengine_config.THIRD_PARTY_LIBS:
            with open(lib.file_path, 'w'):
                pass

        # Just looking for no crash.
        appengine_config._import_and_enable_modules('GCB_THIRD_PARTY_MODULES',
                                                    reraise=True)
        appengine_config.gcb_init_third_party()
Exemple #2
0
 def test_require_different_version_of_library(self):
     self._write_content(self._yaml_path, self._minimal_content)
     app_yaml = yaml_files.AppYamlFile(self._yaml_path)
     with self.assertRaises(ValueError):
         app_yaml.require_library('jinja2', '2.1')
Exemple #3
0
 def test_get_env_var(self):
     self._write_content(self._yaml_path, self._minimal_content)
     app_yaml = yaml_files.AppYamlFile(self._yaml_path)
     self.assertEquals('bar', app_yaml.get_env('FOO'))
     self.assertEquals('bleep', app_yaml.get_env('BAR'))