stages/user_write: fix unittests
This commit is contained in:
parent
60739e620e
commit
dfe093b2b9
|
@ -60,7 +60,7 @@ class UserWriteStageView(StageView):
|
|||
if not key.startswith("attribute_"):
|
||||
LOGGER.debug("discarding key", key=key)
|
||||
continue
|
||||
user.attributes[key] = value
|
||||
user.attributes[key.replace("attribute_", "", 1)] = value
|
||||
user.save()
|
||||
user_write.send(sender=self, request=request, user=user, data=data)
|
||||
# Check if the password has been updated, and update the session auth hash
|
||||
|
|
|
@ -86,7 +86,7 @@ class TestUserWriteStage(TestCase):
|
|||
plan.context[PLAN_CONTEXT_PROMPT] = {
|
||||
"username": "test-user-new",
|
||||
"password": new_password,
|
||||
"some-custom-attribute": "test",
|
||||
"attribute_some-custom-attribute": "test",
|
||||
}
|
||||
session = self.client.session
|
||||
session[SESSION_KEY_PLAN] = plan
|
||||
|
|
Reference in a new issue