def METHOD_NAME(self):
    user_dict = {"scope": None}
    error = self.assertRaises(
        errors.SystemUsernamesValidationError,
        SystemUser.from_dict,
        user_name="name",
        user_dict=user_dict,
    )
    self.assertThat(error._name, Equals("name"))
    self.assertThat(error._message, Equals("'scope' is undefined"))