Merge pull request #320 from harlowja/master

Begin to make more 'OS' compliant/like.
This commit is contained in:
Joshua Harlow
2012-10-19 15:03:04 -07:00
6 changed files with 75 additions and 8 deletions

View File

@@ -30,9 +30,9 @@ PASSWORD_PROMPT = 'the database user'
def get_shared_passwords(component):
mp = {}
mp['pw'] = component.get_password('sql')
return mp
return {
'pw': component.get_password('sql'),
}
def drop_db(distro, dbtype, user, pw, dbname, **kwargs):

15
anvil/tests/__init__.py Normal file
View File

@@ -0,0 +1,15 @@
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

12
anvil/tests/test_utils.py Normal file
View File

@@ -0,0 +1,12 @@
import unittest
from anvil import utils
class TestUtils(unittest.TestCase):
def test_expand(self):
text = "blah $v"
text = utils.expand_template(text, {
'v': 'blah',
})
self.assertEquals(text, "blah blah")