More explicit get_or_create pattern
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 9 Jan 2013 08:53:55 +0000 (09:53 +0100)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Tue, 15 Jan 2013 13:49:50 +0000 (14:49 +0100)
commit4fc0a289947c5e0ba68f612bc933f25b497f9fca
tree4b506e611056c535ffa7aa1a04f9d9d35793498a
parent947c08ae43914184116995b2d51f11778497a2be
More explicit get_or_create pattern

Don't do "user = getUser() or newUser()" in one line. It is bound to
confuse poor souls. Be more explicit here and even add a code comment.

Thanks to Elrond for not liking the previous pattern.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
mediagoblin/tests/tools.py