def METHOD_NAME(self, uid, phone, msg):
    """
    Insert test messages into the SMS queue for debugging purposes.
    Returns a integer indicating how many rows have been inserted.
    """
    dbconn = self._connect()
    db = dbconn.cursor()
    data = dict(uid=uid, phone=phone, msg=msg)
    sql = """INSERT INTO smsq (accountid, time, phone, msg) VALUES (
             %(uid)s, now(), %(phone)s, %(msg)s)"""
    db.execute(sql, data)
    dbconn.commit()
    return db.rowcount