def test_session_store_ignores_multiple_new_values_in_session_data(self): session_data = SessionData( tx_id="tx_id", schema_name="some_schema_name", period_str="period_str", language_code=None, survey_url=None, ru_name="ru_name", ru_ref="ru_ref", response_id="response_id", questionnaire_id="questionnaire_id", case_id="case_id", ) session_data.additional_value = "some cool new value you do not know about yet" session_data.second_additional_value = "some other not so cool value" with self._app.test_request_context(): self.session_store.create("eq_session_id", "test", session_data, self.expires_at).save() session_store = SessionStore("user_ik", "pepper", "eq_session_id") self.assertFalse( hasattr(session_store.session_data, "additional_value")) self.assertFalse( hasattr(session_store.session_data, "second_additional_value"))
def test_session_store_ignores_new_values_in_session_data(self): session_data = SessionData( tx_id='tx_id', eq_id='eq_id', form_type='form_type', period_str='period_str', language_code=None, survey_url=None, ru_name='ru_name', ru_ref='ru_ref' ) session_data.additional_value = 'some cool new value you do not know about yet' with self._app.test_request_context(): self.session_store.create('eq_session_id', 'test', session_data).save() session_store = SessionStore('user_ik', 'pepper', 'eq_session_id') self.assertFalse(hasattr(session_store.session_data, 'additional_value'))