def test_two(self): from session_storage_memcached import SessionStorageMemcached from login_biz import Login_Biz lb = Login_Biz(Mockup_Account_Biz(), SessionStorageMemcached('127.0.0.1:11211', 'test_session_storage_memcached')) lb.login('test_user_1', PASSWORD) lb.logout('test_user_2') self.assert_( lb.is_logged_in('test_user_1') ) self.assert_( not lb.is_logged_in('test_user_2') )
def testis_not_logged_in(self): from login_biz import Login_Biz lb = Login_Biz(Mockup_Account_Biz(), Mockup_Session_Storage()) self.assert_( not lb.is_logged_in('test_user_2') )
def testis_logged_in(self): from login_biz import Login_Biz lb = Login_Biz(Mockup_Account_Biz(), Mockup_Session_Storage()) lb.login('test_user_1', PASSWORD) self.assert_( lb.is_logged_in('test_user_1') )