def test_format_parameter_file_no_template(self):
     tmpl_file = None
     contents = 'DBUsername=wp\nDBPassword=verybadpassword'
     utils.read_url_content = mock.MagicMock()
     utils.read_url_content.return_value = 'DBUsername=wp\n' \
                                           'DBPassword=verybadpassword'
     p = utils.format_parameter_file(['env_file1=test_file1'], tmpl_file)
     self.assertEqual({'env_file1': contents}, p)
Example #2
0
    def test_format_parameter_file(self):
        tmpl_file = '/opt/stack/template.yaml'
        contents = 'DBUsername=wp\nDBPassword=verybadpassword'
        utils.read_url_content = mock.MagicMock()
        utils.read_url_content.return_value = ('DBUsername=wp\n'
                                               'DBPassword=verybadpassword')

        p = utils.format_parameter_file(['env_file1=test_file1'], tmpl_file)
        self.assertEqual({'env_file1': contents}, p)
 def test_format_parameter_file_no_template(self):
     tmpl_file = None
     contents = 'DBUsername=wp\nDBPassword=verybadpassword'
     utils.read_url_content = mock.MagicMock()
     utils.read_url_content.return_value = 'DBUsername=wp\n' \
                                           'DBPassword=verybadpassword'
     p = utils.format_parameter_file([
         'env_file1=test_file1'], tmpl_file)
     self.assertEqual({'env_file1': contents
                       }, p)
    def test_format_parameter_file(self):
        tmpl_file = '/opt/stack/template.yaml'
        contents = 'DBUsername=wp\nDBPassword=verybadpassword'
        utils.read_url_content = mock.MagicMock()
        utils.read_url_content.return_value = ('DBUsername=wp\n'
                                               'DBPassword=verybadpassword')

        p = utils.format_parameter_file([
            'env_file1=test_file1'], tmpl_file)
        self.assertEqual({'env_file1': contents
                          }, p)
 def test_format_parameter_file_none(self):
     self.assertEqual({}, utils.format_parameter_file(None))
Example #6
0
 def test_format_parameter_file_none(self):
     self.assertEqual({}, utils.format_parameter_file(None))