'Test expected error message when admin attempts to change a user\'s
username to a username that is taken by another user.'

def test_admin_edits_user_invalid_username(self):

    self._login_admin()
    new_username = self.admin.username
    self.client.post(url_for('admin_edit_user', user_id=self.user.id), data=dict(username=new_username, is_admin=False, password='', password_again=''))
    self.assertMessageFlashed('Username    "{}"    is    already    taken!'.format(new_username), 'error')
