Exemple #1
0
 def test_user_remove(self):
     postgres.user_remove(
         'test_user',
         user='******',
         host='test_host',
         port='test_port',
         maintenance_db='maint_db',
         password='******',
         runas='foo'
     )
     postgres._run_psql.assert_called_once_with(
         "/usr/bin/pgsql --no-align --no-readline --username test_user "
         "--host test_host --port test_port "
         "--dbname maint_db -c 'DROP ROLE test_user'",
         host='test_host', port='test_port', user='******',
         password='******', runas='foo')
 def test_user_remove(self):
     postgres.user_remove(
         'test_user',
         user='******',
         host='test_host',
         port='test_port',
         maintenance_db='maint_db',
         password='******',
         runas='foo'
     )
     postgres._run_psql.assert_called_once_with(
         "/usr/bin/pgsql --no-align --no-readline --no-password --username test_user "
         "--host test_host --port test_port "
         "--dbname maint_db -c 'DROP ROLE test_user'",
         host='test_host', port='test_port', user='******',
         password='******', runas='foo')
Exemple #3
0
 def test_user_remove(self):
     postgres.user_remove(
         'testuser',
         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 "testuser"'],
         host='testhost', port='testport', user='******',
         password='******', runas='foo')
Exemple #4
0
 def test_user_remove(self):
     postgres.user_remove('testuser',
                          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 "testuser"'
     ],
                                                host='testhost',
                                                port='testport',
                                                user='******',
                                                password='******',
                                                runas='foo')