aboutsummaryrefslogtreecommitdiff
path: root/bindings/python-cffi/tests
diff options
context:
space:
mode:
authorFloris Bruynooghe <flub@devork.be>2019-11-17 17:41:35 +0100
committerDavid Bremner <david@tethera.net>2019-12-03 08:12:30 -0400
commite2df30f7a98f91543d0b3561dbb366eb4b3d812c (patch)
tree7b1bb0c60d8723e9e58158b151afbb5d0989c56f /bindings/python-cffi/tests
parenta950aa28449feef76246ad2b64224fd72e2e574c (diff)
Rename package to notmuch2
This is based on a previous discussion on the list where this was more or less seen as the least-bad option.
Diffstat (limited to 'bindings/python-cffi/tests')
-rw-r--r--bindings/python-cffi/tests/test_base.py4
-rw-r--r--bindings/python-cffi/tests/test_database.py14
-rw-r--r--bindings/python-cffi/tests/test_message.py14
-rw-r--r--bindings/python-cffi/tests/test_tags.py4
-rw-r--r--bindings/python-cffi/tests/test_thread.py18
5 files changed, 27 insertions, 27 deletions
diff --git a/bindings/python-cffi/tests/test_base.py b/bindings/python-cffi/tests/test_base.py
index b6d3d62c..d3280a67 100644
--- a/bindings/python-cffi/tests/test_base.py
+++ b/bindings/python-cffi/tests/test_base.py
@@ -1,7 +1,7 @@
import pytest
-from notdb import _base as base
-from notdb import _errors as errors
+from notmuch2 import _base as base
+from notmuch2 import _errors as errors
class TestNotmuchObject:
diff --git a/bindings/python-cffi/tests/test_database.py b/bindings/python-cffi/tests/test_database.py
index 02de0f41..e3a8344d 100644
--- a/bindings/python-cffi/tests/test_database.py
+++ b/bindings/python-cffi/tests/test_database.py
@@ -5,10 +5,10 @@ import pathlib
import pytest
-import notdb
-import notdb._errors as errors
-import notdb._database as dbmod
-import notdb._message as message
+import notmuch2
+import notmuch2._errors as errors
+import notmuch2._database as dbmod
+import notmuch2._message as message
@pytest.fixture
@@ -279,7 +279,7 @@ class TestQuery:
@pytest.fixture
def db(self, maildir, notmuch):
- """Return a read-only notdb.Database.
+ """Return a read-only notmuch2.Database.
The database will have 3 messages, 2 threads.
"""
@@ -306,7 +306,7 @@ class TestQuery:
def test_message_match(self, db):
msgs = db.messages('*')
msg = next(msgs)
- assert isinstance(msg, notdb.Message)
+ assert isinstance(msg, notmuch2.Message)
def test_count_threads(self, db):
assert db.count_threads('*') == 2
@@ -323,4 +323,4 @@ class TestQuery:
def test_threads_match(self, db):
threads = db.threads('*')
thread = next(threads)
- assert isinstance(thread, notdb.Thread)
+ assert isinstance(thread, notmuch2.Thread)
diff --git a/bindings/python-cffi/tests/test_message.py b/bindings/python-cffi/tests/test_message.py
index 56d06f34..532bf921 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):
@@ -142,7 +142,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
diff --git a/bindings/python-cffi/tests/test_tags.py b/bindings/python-cffi/tests/test_tags.py
index 0cb42d89..f12fa1e6 100644
--- a/bindings/python-cffi/tests/test_tags.py
+++ b/bindings/python-cffi/tests/test_tags.py
@@ -9,8 +9,8 @@ import textwrap
import pytest
-from notdb import _database as database
-from notdb import _tags as tags
+from notmuch2 import _database as database
+from notmuch2 import _tags as tags
class TestImmutable:
diff --git a/bindings/python-cffi/tests/test_thread.py b/bindings/python-cffi/tests/test_thread.py
index 366bd8a5..1f44b35d 100644
--- a/bindings/python-cffi/tests/test_thread.py
+++ b/bindings/python-cffi/tests/test_thread.py
@@ -3,7 +3,7 @@ import time
import pytest
-import notdb
+import notmuch2
@pytest.fixture
@@ -13,17 +13,17 @@ def thread(maildir, notmuch):
maildir.deliver(body='bar',
headers=[('In-Reply-To', '<{}>'.format(msgid))])
notmuch('new')
- with notdb.Database(maildir.path) as db:
+ with notmuch2.Database(maildir.path) as db:
yield next(db.threads('foo'))
def test_type(thread):
- assert isinstance(thread, notdb.Thread)
+ assert isinstance(thread, notmuch2.Thread)
assert isinstance(thread, collections.abc.Iterable)
def test_threadid(thread):
- assert isinstance(thread.threadid, notdb.BinString)
+ assert isinstance(thread.threadid, notmuch2.BinString)
assert thread.threadid
@@ -37,21 +37,21 @@ def test_toplevel_type(thread):
def test_toplevel(thread):
msgs = thread.toplevel()
- assert isinstance(next(msgs), notdb.Message)
+ assert isinstance(next(msgs), notmuch2.Message)
with pytest.raises(StopIteration):
next(msgs)
def test_toplevel_reply(thread):
msg = next(thread.toplevel())
- assert isinstance(next(msg.replies()), notdb.Message)
+ assert isinstance(next(msg.replies()), notmuch2.Message)
def test_iter(thread):
msgs = list(iter(thread))
assert len(msgs) == len(thread)
for msg in msgs:
- assert isinstance(msg, notdb.Message)
+ assert isinstance(msg, notmuch2.Message)
def test_matched(thread):
@@ -59,7 +59,7 @@ def test_matched(thread):
def test_authors_type(thread):
- assert isinstance(thread.authors, notdb.BinString)
+ assert isinstance(thread.authors, notmuch2.BinString)
def test_authors(thread):
@@ -91,7 +91,7 @@ def test_first_last(thread):
def test_tags_type(thread):
- assert isinstance(thread.tags, notdb.ImmutableTagSet)
+ assert isinstance(thread.tags, notmuch2.ImmutableTagSet)
def test_tags_cache(thread):