'Verifies that get_user_preferences returns appropriate errors.'

def test_get_user_preferences_errors(self):

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