Example #1
0
 def test_create_mysql_args_with_setting_database_name(self):
     mysql_args = database._create_mysql_args(db_name='mydb')
     expected_args = ['-u', 'dye_user', '-pdye_password', 'mydb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #2
0
 def test_create_mysql_args_with_host(self):
     database.db_details['host'] = 'dbserver.com'
     mysql_args = database._create_mysql_args()
     expected_args = ['-u', 'dye_user', '-pdye_password', '--host=dbserver.com', 'dyedb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #3
0
 def test_create_mysql_args_with_port(self):
     database.db_details['port'] = 3333
     mysql_args = database._create_mysql_args()
     expected_args = ['-u', 'dye_user', '-pdye_password', '--port=3333', 'dyedb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #4
0
 def test_create_mysql_args_simple_case(self):
     mysql_args = database._create_mysql_args()
     expected_args = ['-u', 'dye_user', '-pdye_password', 'dyedb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #5
0
 def test_create_mysql_args_with_setting_database_name(self):
     mysql_args = database._create_mysql_args(db_name='mydb')
     expected_args = ['-u', 'dye_user', '-pdye_password', 'mydb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #6
0
 def test_create_mysql_args_with_port(self):
     database.db_details['port'] = 3333
     mysql_args = database._create_mysql_args()
     expected_args = ['-u', 'dye_user', '-pdye_password', '--port=3333', 'dyedb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #7
0
 def test_create_mysql_args_with_host(self):
     database.db_details['host'] = 'dbserver.com'
     mysql_args = database._create_mysql_args()
     expected_args = ['-u', 'dye_user', '-pdye_password', '--host=dbserver.com', 'dyedb']
     self.assertSequenceEqual(expected_args, mysql_args)
Example #8
0
 def test_create_mysql_args_simple_case(self):
     mysql_args = database._create_mysql_args()
     expected_args = ['-u', 'dye_user', '-pdye_password', 'dyedb']
     self.assertSequenceEqual(expected_args, mysql_args)