Пример #1
0
 def assert_fails(self, user_name, password, ip):
     from reddwarf.tests.util import mysql
     try:
         with mysql.create_mysql_connection(ip, user_name, password) as db:
             pass
         fail("Should have failed to connect: mysql --host %s -u %s -p%s"
              % (ip, user_name, password))
     except mysql.MySqlPermissionsFailure:
         return  # Good, this is what we wanted.
     except mysql.MySqlConnectionFailure as mcf:
         fail("Expected to see permissions failure. Instead got message:"
              "%s" % mcf.message)
Пример #2
0
 def assert_fails(self, user_name, password, ip):
     from reddwarf.tests.util import mysql
     try:
         with mysql.create_mysql_connection(ip, user_name, password) as db:
             pass
         fail("Should have failed to connect: mysql --host %s -u %s -p%s" %
              (ip, user_name, password))
     except mysql.MySqlPermissionsFailure:
         return  # Good, this is what we wanted.
     except mysql.MySqlConnectionFailure as mcf:
         fail("Expected to see permissions failure. Instead got message:"
              "%s" % mcf.message)
Пример #3
0
 def create(self, ip, user_name, password):
     from reddwarf.tests.util import mysql
     return mysql.create_mysql_connection(ip, user_name, password)
Пример #4
0
 def create(self, ip, user_name, password):
     from reddwarf.tests.util import mysql
     return mysql.create_mysql_connection(ip, user_name, password)