Switch to side-by-side view
--- a/Allura/allura/tests/model/test_artifact.py +++ b/Allura/allura/tests/model/test_artifact.py @@ -149,3 +149,11 @@ assert 'author_display_name_t' in idx assert 'timestamp_dt' in idx assert m.shorthand_id() == m.slug + +@with_setup(setUp, tearDown) +def test_messages_unknown_lookup(): + from bson import ObjectId + m = Checkmessage() + m.author_id = ObjectId() # something new + assert type(m.author()) == M.User, type(m.author()) + assert m.author() == M.User.anonymous()