

def test_uidvalidity_changed(self):
    db = mock_db()
    account = _account_for_test(db=db)
    msg13_bis_data = (13, set(['\\Seen']), 'Subject: another message')
    with mock_worker(fol1={
        13: msg13_data,
        'UIDVALIDITY': 1234,
    }):
        account.perform_update()
    with mock_worker(fol1={
        13: msg13_bis_data,
        'UIDVALIDITY': 1239,
    }):
        account.perform_update()
    account2 = _account_for_test(db=db)
    fol1 = account2.get_folder('fol1')
    self.assertEqual(fol1._uidvalidity, 1239)
    self.assertEqual([m.raw_headers for m in fol1.list_messages()], [msg13_bis_data[2]])

dataset/ETHPy150Open mgax/tinymail/src/tinymail/tests/test_account.py PersistenceTest.test_uidvalidity_changed/original