X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=bindings%2Fpython-cffi%2Ftests%2Ftest_message.py;h=56701d056de5ff6d1cda5e7fc0c53b1cdd8a6de5;hb=22e04ed01acc115b7fb25b60231014f585f11c4a;hp=56d06f34cb88891dd5514b8ca3d6359e79acddbc;hpb=83c2d158983875bf77a9b7662894df585b61741c;p=notmuch diff --git a/bindings/python-cffi/tests/test_message.py b/bindings/python-cffi/tests/test_message.py index 56d06f34..56701d05 100644 --- a/bindings/python-cffi/tests/test_message.py +++ b/bindings/python-cffi/tests/test_message.py @@ -4,7 +4,7 @@ import pathlib import pytest -import notdb +import notmuch2 class TestMessage: @@ -17,7 +17,7 @@ class TestMessage: @pytest.fixture def db(self, maildir): - with notdb.Database.create(maildir.path) as db: + with notmuch2.Database.create(maildir.path) as db: yield db @pytest.fixture @@ -26,8 +26,8 @@ class TestMessage: yield msg def test_type(self, msg): - assert isinstance(msg, notdb.NotmuchObject) - assert isinstance(msg, notdb.Message) + assert isinstance(msg, notmuch2.NotmuchObject) + assert isinstance(msg, notmuch2.Message) def test_alive(self, msg): assert msg.alive @@ -41,7 +41,7 @@ class TestMessage: def test_messageid_type(self, msg): assert isinstance(msg.messageid, str) - assert isinstance(msg.messageid, notdb.BinString) + assert isinstance(msg.messageid, notmuch2.BinString) assert isinstance(bytes(msg.messageid), bytes) def test_messageid(self, msg, maildir_msg): @@ -53,7 +53,7 @@ class TestMessage: def test_threadid_type(self, msg): assert isinstance(msg.threadid, str) - assert isinstance(msg.threadid, notdb.BinString) + assert isinstance(msg.threadid, notmuch2.BinString) assert isinstance(bytes(msg.threadid), bytes) def test_path_type(self, msg): @@ -97,6 +97,9 @@ class TestMessage: def test_ghost_no(self, msg): assert not msg.ghost + def test_matched_no(self,msg): + assert not msg.matched + def test_date(self, msg): # XXX Someone seems to treat things as local time instead of # UTC or the other way around. @@ -142,7 +145,7 @@ class TestProperties: @pytest.fixture def props(self, maildir): msgid, path = maildir.deliver() - with notdb.Database.create(maildir.path) as db: + with notmuch2.Database.create(maildir.path) as db: msg, dup = db.add(path, sync_flags=False) yield msg.properties