'Verifies that get_user_preference returns appropriate errors.'

def test_get_user_preference_errors(self):

    with self.assertRaises(UserNotFound):
        get_user_preference(self.user, self.test_preference_key, username='no_such_user')
    with self.assertRaises(UserNotFound):
        get_user_preference(self.no_such_user, self.test_preference_key)
    with self.assertRaises(UserNotAuthorized):
        get_user_preference(self.different_user, self.test_preference_key, username=self.user.username)
