aboutsummaryrefslogtreecommitdiffstats
path: root/fabtools/tests/test_postgres.py
diff options
context:
space:
mode:
Diffstat (limited to 'fabtools/tests/test_postgres.py')
-rw-r--r--fabtools/tests/test_postgres.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/fabtools/tests/test_postgres.py b/fabtools/tests/test_postgres.py
index 526d3b5..2a6a1b6 100644
--- a/fabtools/tests/test_postgres.py
+++ b/fabtools/tests/test_postgres.py
@@ -4,15 +4,23 @@ import unittest
class PostgresTestCase(unittest.TestCase):
+ @mock.patch('fabtools.require.postgres._service_name')
+ @mock.patch('fabtools.require.postgres.restarted')
+ @mock.patch('fabtools.require.postgres.watch')
+ @mock.patch('fabtools.require.postgres.require_locale')
@mock.patch('fabtools.require.postgres.create_database')
@mock.patch('fabtools.require.postgres.database_exists')
- def test_params_respected(self, database_exists, create_database):
- """ If require.database is called, ensure that the template, encoding
- and locale parameters are passed through to the underlying
- create_database call """
+ def test_params_respected(self, database_exists, create_database,
+ require_locale, watch, restarted, service_name):
+ """
+ If require.database is called, ensure that the template,
+ encoding and locale parameters are passed through to the
+ underlying create_database call
+ """
from fabtools import require
database_exists.return_value = False
require.postgres.database('foo', 'bar', locale='some_locale',
encoding='some_encoding', template='some_template')
+ require_locale.assert_called_with('some_locale')
create_database.assert_called_with('foo', 'bar', locale='some_locale',
encoding='some_encoding', template='some_template')