'Test that UserNotFound is thrown if there is no user with username.'

def test_update_user_not_found(self):

    with self.assertRaises(UserNotFound):
        update_account_settings(self.user, {}, username='does_not_exist')
    self.user.username = 'does_not_exist'
    with self.assertRaises(UserNotFound):
        update_account_settings(self.user, {})
