Test as_list() on a dict-like py list.
Test exception is correctly raised when we call as_list() on an irrelevant dict.