Test client session does not behave as stated in the django documentation.
|Reported by:||aaronmerriam@…||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
In the documentation for testing, it states that you can run the following code to manually insert values into the test client session.
def test_something(self): session = self.client.session session['somekey'] = 'test' session.save()
In actuality, self.client.session is of type dict and a calling save() raises an AttributeError.
Change History (7)
comment:1 Changed 3 years ago by bmispelon
- Cc bmispelon@… added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Version changed from 1.5 to master
comment:5 Changed 2 years ago by Tim Graham <timograham@…>
- Resolution set to fixed
- Status changed from new to closed