def METHOD_NAME(self):
    group = self.create_random_name(prefix='group', length=24)
    server = self.create_random_name(prefix='server', length=24)
    with mock.patch('azext_db_up.custom._run_mysql_commands'):
        with mock.patch('mysql.connector.connect', side_effect=mysql.connector.errors.DatabaseError()):
            output = self.cmd('mysql up -g {} -s {}'.format(group, server)).get_output_in_json()
            user, server_name = output['username'].split('@')
            password, database = output['password'], 'sampledb'
            self.assertEqual(server, server_name)
            # test followup iterations of up
            self.cmd('mysql up', checks=[JMESPathCheck('password', '*****')])
            self.cmd('mysql up -p {}'.format(password), checks=[JMESPathCheck('password', password)])
    # check that db and server exist
    self.cmd('mysql db show -n {} -g {} -s {}'.format(database, group, server))
    # remove all resources used by up
    self.cmd('mysql down -y --delete-group')
    # check group no longer exists
    with self.assertRaises(SystemExit) as ex:
        self.cmd('group show -n {}'.format(group))
    self.assertEqual(ex.exception.code, 3)
    # check that show-connection-string matches previous output
    output_mirror = self.cmd('mysql show-connection-string -p {} -u {} -d {} -s {}'.format(
        password, user, database, server)).get_output_in_json()
    self.assertEqual(output, output_mirror)