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)
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)
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)
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)