示例#1
0
 def test_group_remove(self):
     postgres.group_remove(
         'testgroup',
         user='******',
         host='testhost',
         port='testport',
         maintenance_db='maint_db',
         password='******',
         runas='foo'
     )
     postgres._run_psql.assert_called_once_with(
         "/usr/bin/pgsql --no-align --no-readline --no-password --username testuser "
         "--host testhost --port testport "
         "--dbname maint_db -c 'DROP ROLE testgroup'",
         host='testhost', user='******',
         password='******', runas='foo', port='testport')
示例#2
0
 def test_group_remove(self):
     postgres.group_remove(
         'testgroup',
         user='******',
         host='testhost',
         port='testport',
         maintenance_db='maint_db',
         password='******',
         runas='foo'
     )
     postgres._run_psql.assert_called_once_with(
         "/usr/bin/pgsql --no-align --no-readline --username testuser "
         "--host testhost --port testport "
         "--dbname maint_db -c 'DROP ROLE testgroup'",
         host='testhost', user='******',
         password='******', runas='foo', port='testport')
示例#3
0
 def test_group_remove(self):
     postgres.group_remove(
         'testgroup',
         user='******',
         host='testhost',
         port='testport',
         maintenance_db='maint_db',
         password='******',
         runas='foo'
     )
     postgres._run_psql.assert_called_once_with(
         ['/usr/bin/pgsql', '--no-align', '--no-readline',
          '--no-password', '--username', 'testuser', '--host',
          'testhost', '--port', 'testport', '--dbname', 'maint_db',
          '-c', 'DROP ROLE "testgroup"'],
         host='testhost', user='******',
         password='******', runas='foo', port='testport')
示例#4
0
 def test_group_remove(self):
     postgres.group_remove('testgroup',
                           user='******',
                           host='testhost',
                           port='testport',
                           maintenance_db='maint_db',
                           password='******',
                           runas='foo')
     postgres._run_psql.assert_called_once_with([
         '/usr/bin/pgsql', '--no-align', '--no-readline', '--no-password',
         '--username', 'testuser', '--host', 'testhost', '--port',
         'testport', '--dbname', 'maint_db', '-c', 'DROP ROLE "testgroup"'
     ],
                                                host='testhost',
                                                user='******',
                                                password='******',
                                                runas='foo',
                                                port='testport')