<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def namedb_get_all_account_addresses(cur):
 """ TESTING ONLY get all account addresses """

    assert BLOCKSTACK_TEST, 'BUG: this method is only available in test mode'
    sql = 'SELECT DISTINCT address FROM accounts;'
    args = ()
    rows = namedb_query_execute(cur, sql, args)

    ret = []
    for rowdata in rows:
        ret.append(rowdata['address'])

    return ret