Beispiel #1
0
 def test_group_update(self):
     postgres.group_update(
         'testgroup',
         user='******',
         host='testhost',
         port='testport',
         maintenance_db='maint_db',
         password='******',
         createdb=False,
         createuser=False,
         encrypted=False,
         replication=False,
         rolepassword='******',
         groups='testgroup',
         runas='foo'
     )
     # postgres._run_psql.call_args[0][0] will contain the list of CLI args.
     # The first 13 elements of this list are initial args used in all (or
     # virtually all) commands run through _run_psql(), so the actual SQL
     # query will be in the 14th argument.
     self.assertTrue(
         re.match(
             'ALTER.* "testgroup" .* UNENCRYPTED PASSWORD',
             postgres._run_psql.call_args[0][0][13]
         )
     )
Beispiel #2
0
 def test_group_update(self):
     postgres.group_update('testgroup',
                           user='******',
                           host='testhost',
                           port='testport',
                           maintenance_db='maint_db',
                           password='******',
                           createdb=False,
                           createuser=False,
                           encrypted=False,
                           replication=False,
                           rolepassword='******',
                           groups='testgroup',
                           runas='foo')
     self.assertTrue(
         re.match('.*'
                  '(\'|\")ALTER.* testgroup .* UNENCRYPTED PASSWORD',
                  postgres._run_psql.call_args[0][0]))
Beispiel #3
0
 def test_group_update(self):
     postgres.group_update(
         'testgroup',
         user='******',
         host='testhost',
         port='testport',
         maintenance_db='maint_db',
         password='******',
         createdb=False,
         createuser=False,
         encrypted=False,
         replication=False,
         rolepassword='******',
         groups='testgroup',
         runas='foo'
     )
     self.assertTrue(re.match(
         '.*'
         '(\'|\")ALTER.* (\\\\)?"testgroup(\\\\)?" .* UNENCRYPTED PASSWORD',
         postgres._run_psql.call_args[0][0]))
Beispiel #4
0
 def test_group_update(self):
     postgres.group_update('testgroup',
                           user='******',
                           host='testhost',
                           port='testport',
                           maintenance_db='maint_db',
                           password='******',
                           createdb=False,
                           createuser=False,
                           encrypted=False,
                           replication=False,
                           rolepassword='******',
                           groups='testgroup',
                           runas='foo')
     # postgres._run_psql.call_args[0][0] will contain the list of CLI args.
     # The first 13 elements of this list are initial args used in all (or
     # virtually all) commands run through _run_psql(), so the actual SQL
     # query will be in the 14th argument.
     self.assertTrue(
         re.match('ALTER.* "testgroup" .* UNENCRYPTED PASSWORD',
                  postgres._run_psql.call_args[0][0][13]))