Test is session is None before trying to access its attributes.
I'm writing tests first for the tape drive, and it is complaining when creating a device. An AttributeError is raised at several places because it tries to access attributes of kamzik3.session wich is None.
The changes fix this (and test passes :)