def test_omemo_state_raises_runtime_error_if_not_connected(self, mockdb):
        mockdb.return_value = get_test_db_connection()

        ProfOmemoUser.reset()

        with pytest.raises(RuntimeError):
            _ = ProfOmemoState()
    def test_reset_omemo_user(self):
        account = '*****@*****.**'
        fulljid = '[email protected]/profanity'

        ProfOmemoUser.set_user(account, fulljid)

        ProfOmemoUser().account == account
        ProfOmemoUser().fulljid == fulljid

        ProfOmemoUser.reset()

        ProfOmemoUser().account is None
        ProfOmemoUser().fulljid is None
 def teardown_method(self, test_method):
     ProfActiveOmemoChats.reset()
     ProfOmemoUser.reset()
Example #4
0
def prof_on_shutdown():
    log.debug('prof_on_shutdown() called')
    ProfOmemoUser.reset()
Example #5
0
def prof_on_disconnect(account_name, fulljid):
    log.debug('prof_on_disconnect() called')
    ProfOmemoUser.reset()
Example #6
0
def prof_on_unload():
    log.debug('prof_on_unload() called')
    ProfOmemoUser.reset()
def prof_on_shutdown():
    log.debug('prof_on_shutdown() called')
    ProfOmemoUser.reset()
def prof_on_disconnect(account_name, fulljid):
    log.debug('prof_on_disconnect() called')
    ProfOmemoUser.reset()
def prof_on_unload():
    log.debug('prof_on_unload() called')
    ProfOmemoUser.reset()
 def teardown_method(self, test_method):
     ProfOmemoUser.reset()
     ProfActiveOmemoChats.reset()