def test_delete_in_backend_and_recreate(self):
        """Make sure we can recreate a user but as a different one"""
        # first, create a user and register it with services
        try:
            self.msu.create_user('freddie', 'mercury', 'mrbadguy@queen.com')
        except NotImplementedError:
            skip("user management not supported in this version of managesf")
        self.logout()
        self.login('freddie', 'mercury', config.GATEWAY_URL)
        gerrit_id = self.gu.get_account('freddie').get('_account_id')
        if has_issue_tracker():
            tracker_id = self.rm.get_user_id_by_username('freddie')
        del_url = config.GATEWAY_URL +\
            'manage/services_users/?email=mrbadguy@queen.com'
        auth_cookie = config.USERS[config.ADMIN_USER]['auth_cookie']
        d = requests.delete(del_url,
                            cookies={'auth_pubtkt': auth_cookie})
        self.assertTrue(int(d.status_code) < 400, d.status_code)
        self.assertEqual(False,
                         self.gu.get_account('freddie'))
        if has_issue_tracker():
            users = self.rm.active_users()
            self.assertEqual(0,
                             len([u for u in users
                                  if u[0] == 'freddie']))
        # recreate the user in the backends
        time.sleep(5)
        self.logout()
        self.login('freddie', 'mercury', config.GATEWAY_URL)
        new_gerrit_id = self.gu.get_account('freddie').get('_account_id')
        self.assertTrue(gerrit_id != new_gerrit_id)
        if has_issue_tracker():
            new_tracker_id = self.rm.get_user_id_by_username('freddie')
            self.assertTrue(tracker_id != new_tracker_id)
dataset/ETHPy150Open redhat-cip/software-factory/tests/functional/test_userdata.py/TestUserdata.test_delete_in_backend_and_recreate/original